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 newParticleDataobject.BlockTexture(org.bukkit.Material material, byte data) Initializes a newParticleDataObject. -
Method Summary
Modifier and TypeMethodDescriptiongetBlockData(org.bukkit.Material material) Gets the nms block data of the given bukkitMaterial.Converts the currentParticleDatainstance into nms data.Methods inherited from class xyz.xenondevs.particle.data.texture.ParticleTexture
getData, getMaterialMethods inherited from class xyz.xenondevs.particle.data.ParticleData
getEffect, setEffect
-
Constructor Details
-
BlockTexture
public BlockTexture(org.bukkit.Material material) Initializes a newParticleDataobject.- Parameters:
material- theMaterialthe particle should display.
-
BlockTexture
public BlockTexture(org.bukkit.Material material, byte data) Initializes a newParticleDataObject.- Parameters:
material- theMaterialthe particle should display.data- the damage value that should influence the texture.
-
-
Method Details
-
toNMSData
Converts the currentParticleDatainstance 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:
toNMSDatain classParticleTexture- Returns:
- the nms data.
-
getBlockData
Gets the nms block data of the given bukkitMaterial.- Parameters:
material- theMaterialwhose data should be got.- Returns:
- the block data of the specified
Materialornullwhen an error occurs.
-