Class FlameParticleData
java.lang.Object
com.pixelmonmod.pixelmon.client.particle.particles.flame.FlameParticleData
- All Implemented Interfaces:
net.minecraft.core.particles.ParticleOptions
public class FlameParticleData
extends Object
implements net.minecraft.core.particles.ParticleOptions
Based on TheGreyGhost's MinecraftByExample
The particle has two pieces of information which are used to customise it:
1) The colour (tint) which is used to change the hue of the particle
2) The diameter of the particle
This class is used to
1) store this information, and
2) transmit it between server and client (write and read methods), and
3) parse it from a command string i.e. the /particle params
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.core.particles.ParticleOptions
net.minecraft.core.particles.ParticleOptions.Deserializer<T extends net.minecraft.core.particles.ParticleOptions>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<FlameParticleData>
static final net.minecraft.core.particles.ParticleOptions.Deserializer<FlameParticleData>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
getTint()
net.minecraft.core.particles.ParticleType<FlameParticleData>
getType()
void
writeToNetwork
(net.minecraft.network.FriendlyByteBuf buf)
-
Field Details
-
CODEC
-
DESERIALIZER
public static final net.minecraft.core.particles.ParticleOptions.Deserializer<FlameParticleData> DESERIALIZER
-
-
Constructor Details
-
FlameParticleData
-
-
Method Details
-
getTint
-
getDiameter
public double getDiameter()- Returns:
- get diameter of particle in metres
-
getType
- Specified by:
getType
in interfacenet.minecraft.core.particles.ParticleOptions
-
writeToNetwork
public void writeToNetwork(net.minecraft.network.FriendlyByteBuf buf) - Specified by:
writeToNetwork
in interfacenet.minecraft.core.particles.ParticleOptions
-
writeToString
- Specified by:
writeToString
in interfacenet.minecraft.core.particles.ParticleOptions
-