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
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<FlameParticleData> CODEC
    • DESERIALIZER

      public static final net.minecraft.core.particles.ParticleOptions.Deserializer<FlameParticleData> DESERIALIZER
  • Constructor Details

    • FlameParticleData

      public FlameParticleData(Color tint, double diameter)
  • Method Details

    • getTint

      public Color getTint()
    • getDiameter

      public double getDiameter()
      Returns:
      get diameter of particle in metres
    • getType

      @Nonnull public net.minecraft.core.particles.ParticleType<FlameParticleData> getType()
      Specified by:
      getType in interface net.minecraft.core.particles.ParticleOptions
    • writeToNetwork

      public void writeToNetwork(net.minecraft.network.FriendlyByteBuf buf)
      Specified by:
      writeToNetwork in interface net.minecraft.core.particles.ParticleOptions
    • writeToString

      @Nonnull public String writeToString()
      Specified by:
      writeToString in interface net.minecraft.core.particles.ParticleOptions