Class BlockTexture
java.lang.Object
xyz.xenondevs.particle.data.ParticleData
xyz.xenondevs.particle.data.texture.ParticleTexture
xyz.xenondevs.particle.data.texture.BlockTexture
An implementation of the
ParticleTexture
object to support block texture particles.- Since:
- 11.06.2019
- Author:
- ByteZ
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBlockTexture
(org.bukkit.Material material) Initializes a newParticleData
object.BlockTexture
(org.bukkit.Material material, byte data) Initializes a newParticleData
Object. -
Method Summary
Modifier and TypeMethodDescriptiongetBlockData
(org.bukkit.Material material) Gets the nms block data of the given bukkitMaterial
.Converts the currentParticleData
instance into nms data.Methods inherited from class xyz.xenondevs.particle.data.texture.ParticleTexture
getData, getMaterial
Methods inherited from class xyz.xenondevs.particle.data.ParticleData
getEffect, setEffect
-
Constructor Details
-
BlockTexture
public BlockTexture(org.bukkit.Material material) Initializes a newParticleData
object.- Parameters:
material
- theMaterial
the particle should display.
-
BlockTexture
public BlockTexture(org.bukkit.Material material, byte data) Initializes a newParticleData
Object.- Parameters:
material
- theMaterial
the particle should display.data
- the damage value that should influence the texture.
-
-
Method Details
-
toNMSData
Converts the currentParticleData
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 classParticleTexture
- Returns:
- the nms data.
-
getBlockData
Gets the nms block data of the given bukkitMaterial
.- Parameters:
material
- theMaterial
whose data should be got.- Returns:
- the block data of the specified
Material
ornull
when an error occurs.
-