Class BlockTexture


public final class BlockTexture extends ParticleTexture
An implementation of the ParticleTexture object to support block texture particles.
Since:
11.06.2019
Author:
ByteZ
See Also:
  • Constructor Details

    • BlockTexture

      public BlockTexture(org.bukkit.Material material)
      Initializes a new ParticleData object.
      Parameters:
      material - the Material the particle should display.
    • BlockTexture

      public BlockTexture(org.bukkit.Material material, byte data)
      Initializes a new ParticleData Object.
      Parameters:
      material - the Material the particle should display.
      data - the damage value that should influence the texture.
  • Method Details

    • toNMSData

      public Object toNMSData()
      Converts the current ParticleData instance into nms data. If the current minecraft version was released before 1.13 an int array should be returned. If the version was released after 1.12 a nms "ParticleParam" has to be returned.
      Overrides:
      toNMSData in class ParticleTexture
      Returns:
      the nms data.
    • getBlockData

      public Object getBlockData(org.bukkit.Material material)
      Gets the nms block data of the given bukkit Material.
      Parameters:
      material - the Material whose data should be got.
      Returns:
      the block data of the specified Material or null when an error occurs.