ParticleSpawner class

Пакет: com.hypixel.hytale.server.core.asset.type.particle.config

Файл: com/hypixel/hytale/server/core/asset/type/particle/config/ParticleSpawner.java

implements: JsonAssetWithMap<String, DefaultAssetMap<String, ParticleSpawner>>, NetworkSerializable<com.hypixel.hytale.protocol.ParticleSpawner>

Поля (4)

МодификаторыТипИмя
ASSET_STORE
final String PARTICLE_PATH
com.hypixel.hytale.protocol.ParticleSpawner var1
com.hypixel.hytale.protocol.ParticleSpawner var2

Методы (37)

МодификаторыВозвратСигнатура
static DefaultAssetMap<String, ParticleSpawner> getAssetMapDefaultAssetMap<String, ParticleSpawner> getAssetMap()
static AssetStore<String, ParticleSpawner, DefaultAssetMap<String, ParticleSpawner>> getAssetStoreAssetStore<String, ParticleSpawner, DefaultAssetMap<String, ParticleSpawner>> getAssetStore()
public ParticleAttractor[] getAttractorsParticleAttractor[] getAttractors()
public float getCameraOffsetfloat getCameraOffset()
public RangeVector3f getEmitOffsetRangeVector3f getEmitOffset()
public String getIdString getId()
public InitialVelocity getInitialVelocityInitialVelocity getInitialVelocity()
public IntersectionHighlight getIntersectionHighlightIntersectionHighlight getIntersectionHighlight()
public float getLifeSpanfloat getLifeSpan()
public float getLightInfluencefloat getLightInfluence()
public int getMaxConcurrentParticlesint getMaxConcurrentParticles()
public Particle getParticleParticle getParticle()
public ParticleCollision getParticleCollisionParticleCollision getParticleCollision()
public Rangef getParticleLifeSpanRangef getParticleLifeSpan()
public ParticleRotationInfluence getParticleRotationInfluenceParticleRotationInfluence getParticleRotationInfluence()
public FXRenderMode getRenderModeFXRenderMode getRenderMode()
public EmitShape getShapeEmitShape getShape()
public Rangef getSpawnRateRangef getSpawnRate()
public Range getTotalParticlesRange getTotalParticles()
public float getTrailSpawnerPositionMultiplierfloat getTrailSpawnerPositionMultiplier()
public float getTrailSpawnerRotationMultiplierfloat getTrailSpawnerRotationMultiplier()
public UVMotion getUVMotionUVMotion getUVMotion()
public boolean getUseEmitDirectionboolean getUseEmitDirection()
public float getVelocityStretchMultiplierfloat getVelocityStretchMultiplier()
public Rangef getWaveDelayRangef getWaveDelay()
if if(ASSET_STORE == null)
if if(var1 != null)
if if(this.particle != null)
if if(this.particleCollision != null)
if if(this.particleLifeSpan != null)
if if(this.spawnRate != null)
if if(this.waveDelay != null)
if if(this.attractors != null && this.attractors.length > 0)
public boolean isLinearFilteringboolean isLinearFiltering()
public boolean isLowResboolean isLowRes()
public boolean isParticleRotateWithSpawnerboolean isParticleRotateWithSpawner()
public boolean isSpawnBurstboolean isSpawnBurst()

Исходный код

Показать/скрыть
class="kw">package com.hypixel.hytale.server.core.asset.type.particle.config;

class="kw">import com.hypixel.hytale.assetstore.AssetExtraInfo;
class="kw">import com.hypixel.hytale.assetstore.AssetKeyValidator;
class="kw">import com.hypixel.hytale.assetstore.AssetRegistry;
class="kw">import com.hypixel.hytale.assetstore.AssetStore;
class="kw">import com.hypixel.hytale.assetstore.codec.AssetBuilderCodec;
class="kw">import com.hypixel.hytale.assetstore.map.DefaultAssetMap;
class="kw">import com.hypixel.hytale.assetstore.map.JsonAssetWithMap;
class="kw">import com.hypixel.hytale.codec.Codec;
class="kw">import com.hypixel.hytale.codec.KeyedCodec;
class="kw">import com.hypixel.hytale.codec.codecs.EnumCodec;
class="kw">import com.hypixel.hytale.codec.codecs.array.ArrayCodec;
class="kw">import com.hypixel.hytale.codec.schema.metadata.ui.UIDefaultCollapsedState;
class="kw">import com.hypixel.hytale.codec.schema.metadata.ui.UIEditorSectionStart;
class="kw">import com.hypixel.hytale.codec.schema.metadata.ui.UIPropertyTitle;
class="kw">import com.hypixel.hytale.codec.schema.metadata.ui.UITypeIcon;
class="kw">import com.hypixel.hytale.codec.validation.ValidatorCache;
class="kw">import com.hypixel.hytale.codec.validation.Validators;
class="kw">import com.hypixel.hytale.common.util.ArrayUtil;
class="kw">import com.hypixel.hytale.protocol.EmitShape;
class="kw">import com.hypixel.hytale.protocol.FXRenderMode;
class="kw">import com.hypixel.hytale.protocol.InitialVelocity;
class="kw">import com.hypixel.hytale.protocol.IntersectionHighlight;
class="kw">import com.hypixel.hytale.protocol.ParticleRotationInfluence;
class="kw">import com.hypixel.hytale.protocol.Range;
class="kw">import com.hypixel.hytale.protocol.RangeVector3f;
class="kw">import com.hypixel.hytale.protocol.Rangef;
class="kw">import com.hypixel.hytale.protocol.UVMotion;
class="kw">import com.hypixel.hytale.server.core.codec.ProtocolCodecs;
class="kw">import com.hypixel.hytale.server.core.io.NetworkSerializable;
class="kw">import java.lang.ref.SoftReference;
class="kw">import java.util.Arrays;
class="kw">import javax.annotation.Nonnull;

class="kw">public class ParticleSpawner
   class="kw">implements JsonAssetWithMap<String, DefaultAssetMap<String, ParticleSpawner>>,
   NetworkSerializable<com.hypixel.hytale.protocol.ParticleSpawner> {
   class="kw">public class="kw">static class="kw">final String PARTICLE_PATH = "Particles/";
   class="kw">public class="kw">static class="kw">final String PARTICLE_EXTENSION = ".particle";
   class="kw">public class="kw">static class="kw">final AssetBuilderCodec<String, ParticleSpawner> CODEC = AssetBuilderCodec.<String, ParticleSpawner>builder(
         ParticleSpawner.class,
         ParticleSpawner::new,
         Codec.STRING,
         (var0, var1) -> var0.id = var1,
         var0 -> var0.id,
         (var0, var1) -> var0.data = var1,
         var0 -> var0.data
      )
      .metadata(new UITypeIcon("ParticleSpawner.png"))
      .<EmitShape>appendInherited(
         new KeyedCodec<>(
            "Shape",
            new EnumCodec<>(EmitShape.class)
               .documentKey(EmitShape.Sphere, "The particle gets spawned in a spheroid.")
               .documentKey(EmitShape.Cube, "The particle gets spawned in a cuboid.")
         ),
         (var0, var1) -> var0.shape = var1,
         var0 -> var0.shape,
         (var0, var1) -> var0.shape = var1.shape
      )
      .addValidator(Validators.nonNull())
      .documentation("Defines in what shape the EmitOffset is calculated.")
      .add()
      .<RangeVector3f>appendInherited(
         new KeyedCodec<>("EmitOffset", ProtocolCodecs.RANGE_VECTOR3F),
         (var0, var1) -> var0.emitOffset = var1,
         var0 -> var0.emitOffset,
         (var0, var1) -> var0.emitOffset = var1.emitOffset
      )
      .documentation(
         "Defines in what region the particles can be spawned around the `ParticleSpawner` centre.\nIf it contains...\n    ... only 1 range, the particle will always get spawned in a line.\n    ... 2 ranges, the particles will get spawned in a 2d form of the `EmitShape`.\n        E.g. rings can be created with this.\n    ... all 3 ranges, the particle will spawn inside the defined shape. This shape can be hollow in the inside via the `Min` values."
      )
      .add()
      .<Boolean>appendInherited(
         new KeyedCodec<>("UseEmitDirection", Codec.BOOLEAN),
         (var0, var1) -> var0.useEmitDirection = var1,
         var0 -> var0.useEmitDirection,
         (var0, var1) -> var0.useEmitDirection = var1.useEmitDirection
      )
      .documentation("If enabled, the spawn offset determines the direction. Overrides pitch/yaw in `InitialVelocity`.")
      .add()
      .<Range>appendInherited(
         new KeyedCodec<>("TotalParticles", ProtocolCodecs.RANGE),
         (var0, var1) -> var0.totalParticles = var1,
         var0 -> var0.totalParticles,
         (var0, var1) -> var0.totalParticles = var1.totalParticles
      )
      .documentation("Defines how many particles can be spawned by this spawner at maximum throughout its whole lifetime.")
      .add()
      .<Float>appendInherited(
         new KeyedCodec<>("LifeSpan", Codec.FLOAT), (var0, var1) -> var0.lifeSpan = var1, var0 -> var0.lifeSpan, (var0, var1) -> var0.lifeSpan = var1.lifeSpan
      )
      .metadata(new UIPropertyTitle("Spawner Life Span"))
      .documentation("Defines how long the spawner lasts in seconds. If 0, the spawner does not expire.")
      .add()
      .<Integer>appendInherited(
         new KeyedCodec<>("MaxConcurrentParticles", Codec.INTEGER),
         (var0, var1) -> var0.maxConcurrentParticles = var1,
         var0 -> var0.maxConcurrentParticles,
         (var0, var1) -> var0.maxConcurrentParticles = var1.maxConcurrentParticles
      )
      .documentation(
         "Defines how many particles from this spawner can be present at the same time. The client caps this value at 512.\nNormally you would use ParticleLifeSpan[Max]*SpawnRate[Max], but if SpawnBurst is enabled, you would additionally multiply it with 1/WaveDelay[Min]."
      )
      .add()
      .<Rangef>appendInherited(
         new KeyedCodec<>("ParticleLifeSpan", ProtocolCodecs.RANGEF),
         (var0, var1) -> var0.particleLifeSpan = var1,
         var0 -> var0.particleLifeSpan,
         (var0, var1) -> var0.particleLifeSpan = var1.particleLifeSpan
      )
      .documentation("Defines how long a particle lasts in seconds.")
      .add()
      .<Rangef>appendInherited(
         new KeyedCodec<>("SpawnRate", ProtocolCodecs.RANGEF),
         (var0, var1) -> var0.spawnRate = var1,
         var0 -> var0.spawnRate,
         (var0, var1) -> var0.spawnRate = var1.spawnRate
      )
      .documentation("Defines how many particles get spawned: per second normally, per wave if `SpawnBurst` is enabled.")
      .add()
      .<Boolean>appendInherited(
         new KeyedCodec<>("SpawnBurst", Codec.BOOLEAN),
         (var0, var1) -> var0.spawnBurst = var1,
         var0 -> var0.spawnBurst,
         (var0, var1) -> var0.spawnBurst = var1.spawnBurst
      )
      .documentation(
         "If enabled, the amount of particles defined in `SpawnRate` get spawned at the same time every wave.\nThe time distance between these waves is defined in `WaveDelay`."
      )
      .add()
      .<Rangef>appendInherited(
         new KeyedCodec<>("WaveDelay", ProtocolCodecs.RANGEF),
         (var0, var1) -> var0.waveDelay = var1,
         var0 -> var0.waveDelay,
         (var0, var1) -> var0.waveDelay = var1.waveDelay
      )
      .documentation(
         "Defines the time difference between spawn waves.\nIf `SpawnBurst` is enabled, it is the delay between bursts.\nIf `SpawnBurst` is disabled, spawning pauses for this delay after all particles of a wave have expired."
      )
      .add()
      .<InitialVelocity>appendInherited(
         new KeyedCodec<>("InitialVelocity", ProtocolCodecs.INITIAL_VELOCITY),
         (var0, var1) -> var0.initialVelocity = var1,
         var0 -> var0.initialVelocity,
         (var0, var1) -> var0.initialVelocity = var1.initialVelocity
      )
      .documentation(
         "Defines in what direction the particles move upon creation.\nPlease note that the velocity can be affected by `Attractors` or `UseEmitDirection`."
      )
      .add()
      .<ParticleRotationInfluence>appendInherited(
         new KeyedCodec<>(
            "ParticleRotationInfluence",
            new EnumCodec<>(ParticleRotationInfluence.class)
               .documentKey(ParticleRotationInfluence.None, "The rotation only gets affected by the `Animation`/`InitialAnimationFrame`.")
               .documentKey(
                  ParticleRotationInfluence.Billboard,
                  "The particle always faces the camera.\nOnly the rotation around the z-Axis can additionally affect the rotation."
               )
               .documentKey(
                  ParticleRotationInfluence.BillboardY,
                  "The particle only rotates around its y-Axis(Up-Down) to always face the camera.\nOnly the rotation around the z-Axis can additionally affect the rotation."
               )
               .documentKey(
                  ParticleRotationInfluence.BillboardVelocity,
                  "Similar to `Billboard`, only that the y-Axis always aligns with the velocity vector of the particle."
               )
               .documentKey(ParticleRotationInfluence.Velocity, "The particle's y-Axis always aligns with the velocity vector of the particle.")
         ),
         (var0, var1) -> var0.particleRotationInfluence = var1,
         var0 -> var0.particleRotationInfluence,
         (var0, var1) -> var0.particleRotationInfluence = var1.particleRotationInfluence
      )
      .addValidator(Validators.nonNull())
      .metadata(new UIEditorSectionStart("Motion"))
      .documentation("Defines how the rotation of the particle gets affected by the viewing camera or its current motion.")
      .add()
      .<Boolean>appendInherited(
         new KeyedCodec<>("ParticleRotateWithSpawner", Codec.BOOLEAN),
         (var0, var1) -> var0.particleRotateWithSpawner = var1,
         var0 -> var0.particleRotateWithSpawner,
         (var0, var1) -> var0.particleRotateWithSpawner = var1.particleRotateWithSpawner
      )
      .documentation(
         "If enabled, the particles rotate the same amount around their axis (x,y,z) as their `ParticleSystem`.\n\nE.g.: If the system rotates 90\u00b0 around its y-Axis, the particles would all rotate 90\u00b0 around their own y-Axis."
      )
      .add()
      .<Float>appendInherited(
         new KeyedCodec<>("TrailSpawnerPositionMultiplier", Codec.FLOAT),
         (var0, var1) -> var0.trailSpawnerPositionMultiplier = var1,
         var0 -> var0.trailSpawnerPositionMultiplier,
         (var0, var1) -> var0.trailSpawnerPositionMultiplier = var1.trailSpawnerPositionMultiplier
      )
      .addValidator(Validators.range(0.0F, 1.0F))
      .documentation(
         "Defines how strong the particles keep their position when their anchor gets moved.\n    0.0: Moves fully with its anchor.\n    0.5: Moves half the distance with its anchor.\n    1.0: Does not move with its anchor."
      )
      .add()
      .<Float>appendInherited(
         new KeyedCodec<>("TrailSpawnerRotationMultiplier", Codec.FLOAT),
         (var0, var1) -> var0.trailSpawnerRotationMultiplier = var1,
         var0 -> var0.trailSpawnerRotationMultiplier,
         (var0, var1) -> var0.trailSpawnerRotationMultiplier = var1.trailSpawnerRotationMultiplier
      )
      .addValidator(Validators.range(0.0F, 1.0F))
      .documentation(
         "Defines how strong the particles rotate with their `ParticleSystem`.\n    0.0: The particles rotate the same amount as their anchor.\n    0.5: The particles rotate half the amount as their anchor.\n    1.0: The particles don't rotate with their anchor.\n\nE.g.: The anchor rotates 180\u00b0 around its y-Axis, with this value being 0.3 the particles would rotate only 126\u00b0 ((1-0.3)*180\u00b0) with it."
      )
      .add()
      .<Float>append(
         new KeyedCodec<>("VelocityStretchMultiplier", Codec.FLOAT),
         (var0, var1) -> var0.velocityStretchMultiplier = var1,
         var0 -> var0.velocityStretchMultiplier
      )
      .documentation(
         "Stretches the Particles based on velocity. Only functions if `ParticleRotationInfluence` is `BillboardVelocity` or `Velocity`.\nNeeds `None` in `ScaleRatioConstraint` to function properly. Effect is barely visible."
      )
      .add()
      .<ParticleAttractor[]>appendInherited(
         new KeyedCodec<>("Attractors", new ArrayCodec<>(ParticleAttractor.CODEC, ParticleAttractor[]::new)),
         (var0, var1) -> var0.attractors = var1,
         var0 -> var0.attractors,
         (var0, var1) -> var0.attractors = var1.attractors
      )
      .metadata(new UIEditorSectionStart("Attractors"))
      .metadata(UIDefaultCollapsedState.UNCOLLAPSED)
      .documentation("Attractors are the best way to control the motion of particles over time.")
      .add()
      .<FXRenderMode>appendInherited(
         new KeyedCodec<>(
            "RenderMode",
            new EnumCodec<>(FXRenderMode.class)
               .documentKey(FXRenderMode.BlendLinear, "The particles get blended linearly with the environment's background.")
               .documentKey(FXRenderMode.BlendAdd, "The particles get blended additively (lightens) with the background.")
               .documentKey(
                  FXRenderMode.Erosion,
                  "The particle fully covers the background and the lighter the colour the stronger a glow halo is applied to the particle borders.\nOpacity values only cut off semitransparent pixels of the texture."
               )
               .documentKey(FXRenderMode.Distortion, "The particle distorts the background.")
         ),
         (var0, var1) -> var0.renderMode = var1,
         var0 -> var0.renderMode,
         (var0, var1) -> var0.renderMode = var1.renderMode
      )
      .addValidator(Validators.nonNull())
      .metadata(new UIEditorSectionStart("Material"))
      .documentation("Defines how the particles get rendered.\nDefault: `BlendLinear`")
      .add()
      .<Float>appendInherited(
         new KeyedCodec<>("LightInfluence", Codec.FLOAT),
         (var0, var1) -> var0.lightInfluence = var1,
         var0 -> var0.lightInfluence,
         (var0, var1) -> var0.lightInfluence = var1.lightInfluence
      )
      .documentation(
         "Defines if the environment light affects the colour and brightness of the particle.\n0.0: Lighting does not affect it (fullbright). Any other value applies the full lighting.\nAny value above 0 removes the glow from `Erosion` particles."
      )
      .add()
      .<IntersectionHighlight>appendInherited(
         new KeyedCodec<>("IntersectionHighlight", ProtocolCodecs.INTERSECTION_HIGHLIGHT),
         (var0, var1) -> var0.intersectionHighlight = var1,
         var0 -> var0.intersectionHighlight,
         (var0, var1) -> var0.intersectionHighlight = var1.intersectionHighlight
      )
      .documentation("Changes the colour of the region of the particle that intersects a block / is near an intersection.")
      .add()
      .<Boolean>appendInherited(
         new KeyedCodec<>("LinearFiltering", Codec.BOOLEAN),
         (var0, var1) -> var0.linearFiltering = var1,
         var0 -> var0.linearFiltering,
         (var0, var1) -> var0.linearFiltering = var1.linearFiltering
      )
      .documentation("Smoothes the texture, so pixels of low resolution textures are less visible.")
      .add()
      .<UVMotion>appendInherited(
         new KeyedCodec<>("UVMotion", ProtocolCodecs.UV_MOTION),
         (var0, var1) -> var0.uvMotion = var1,
         var0 -> var0.uvMotion,
         (var0, var1) -> var0.uvMotion = var1.uvMotion
      )
      .documentation("Distorts the texture via a flow map. Mainly used for non solid representations like smoke or waves.")
      .add()
      .<Float>append(new KeyedCodec<>("CameraOffset", Codec.FLOAT), (var0, var1) -> var0.cameraOffset = var1, var0 -> var0.cameraOffset)
      .addValidator(Validators.range(-10.0F, 10.0F))
      .documentation(
         "Offsets the particle more towards (negative value) or away (positive value) from the camera.\nUsed to fix z-fighting if the particle aligns with block/model faces."
      )
      .add()
      .<ParticleCollision>appendInherited(
         new KeyedCodec<>("ParticleCollision", ParticleCollision.CODEC),
         (var0, var1) -> var0.particleCollision = var1,
         var0 -> var0.particleCollision,
         (var0, var1) -> var0.particleCollision = var1.particleCollision
      )
      .metadata(new UIEditorSectionStart("Collision"))
      .metadata(UIDefaultCollapsedState.UNCOLLAPSED)
      .documentation("Defines what should happen, if the particle hits a specific block type.")
      .add()
      .<Boolean>appendInherited(
         new KeyedCodec<>("IsLowRes", Codec.BOOLEAN),
         (var0, var1) -> var0.isLowRes = var1,
         var0 -> var0.isLowRes,
         (var0, var1) -> var0.isLowRes = var1.isLowRes
      )
      .metadata(new UIEditorSectionStart("Optimization"))
      .documentation("If enabled, the particles get rendered at a lower resolution to improve performance.")
      .add()
      .<Particle>appendInherited(
         new KeyedCodec<>("Particle", Particle.CODEC),
         (var0, var1) -> var0.particle = var1,
         var0 -> var0.particle,
         (var0, var1) -> var0.particle = var1.particle
      )
      .addValidator(Validators.nonNull())
      .metadata(new UIEditorSectionStart("Particle"))
      .metadata(UIDefaultCollapsedState.UNCOLLAPSED)
      .documentation("Contains the defining values of the particle like animation, size, texture, rotation, opacity and colour.")
      .add()
      .build();
   class="kw">public class="kw">static class="kw">final ValidatorCache<String> VALIDATOR_CACHE = new ValidatorCache<>(new AssetKeyValidator<>(ParticleSpawner::getAssetStore));
   class="kw">private class="kw">static AssetStore<String, ParticleSpawner, DefaultAssetMap<String, ParticleSpawner>> ASSET_STORE;
   class="kw">protected AssetExtraInfo.Data data;
   class="kw">protected String id;
   class="kw">protected Particle particle;
   @Nonnull
   class="kw">protected FXRenderMode renderMode = FXRenderMode.BlendLinear;
   @Nonnull
   class="kw">protected EmitShape shape = EmitShape.Sphere;
   class="kw">protected RangeVector3f emitOffset;
   class="kw">protected boolean useEmitDirection;
   class="kw">protected float cameraOffset;
   @Nonnull
   class="kw">protected ParticleRotationInfluence particleRotationInfluence = ParticleRotationInfluence.None;
   class="kw">protected boolean particleRotateWithSpawner;
   class="kw">protected boolean isLowRes;
   class="kw">protected float trailSpawnerPositionMultiplier;
   class="kw">protected float trailSpawnerRotationMultiplier;
   class="kw">protected ParticleCollision particleCollision;
   class="kw">protected float lightInfluence;
   class="kw">protected boolean linearFiltering;
   class="kw">protected Range totalParticles;
   class="kw">protected float lifeSpan;
   class="kw">protected int maxConcurrentParticles;
   class="kw">protected Rangef particleLifeSpan;
   class="kw">protected Rangef spawnRate;
   class="kw">protected boolean spawnBurst;
   class="kw">protected Rangef waveDelay;
   class="kw">protected InitialVelocity initialVelocity;
   class="kw">protected float velocityStretchMultiplier;
   class="kw">protected UVMotion uvMotion;
   class="kw">protected ParticleAttractor[] attractors;
   class="kw">protected IntersectionHighlight intersectionHighlight;
   class="kw">private SoftReference<com.hypixel.hytale.protocol.ParticleSpawner> cachedPacket;

   class="kw">public class="kw">static AssetStore<String, ParticleSpawner, DefaultAssetMap<String, ParticleSpawner>> getAssetStore() {
      if (ASSET_STORE == null) {
         ASSET_STORE = AssetRegistry.getAssetStore(ParticleSpawner.class);
      }

      class="kw">return ASSET_STORE;
   }

   class="kw">public class="kw">static DefaultAssetMap<String, ParticleSpawner> getAssetMap() {
      class="kw">return (DefaultAssetMap<String, ParticleSpawner>)getAssetStore().getAssetMap();
   }

   class="kw">public ParticleSpawner(
      String var1,
      Particle var2,
      FXRenderMode var3,
      EmitShape var4,
      RangeVector3f var5,
      boolean var6,
      float var7,
      ParticleRotationInfluence var8,
      boolean var9,
      boolean var10,
      float var11,
      float var12,
      ParticleCollision var13,
      float var14,
      boolean var15,
      Range var16,
      float var17,
      int var18,
      Rangef var19,
      Rangef var20,
      boolean var21,
      Rangef var22,
      InitialVelocity var23,
      float var24,
      UVMotion var25,
      ParticleAttractor[] var26,
      IntersectionHighlight var27
   ) {
      this.id = var1;
      this.particle = var2;
      this.renderMode = var3;
      this.shape = var4;
      this.emitOffset = var5;
      this.useEmitDirection = var6;
      this.cameraOffset = var7;
      this.particleRotationInfluence = var8;
      this.particleRotateWithSpawner = var9;
      this.isLowRes = var10;
      this.trailSpawnerPositionMultiplier = var11;
      this.trailSpawnerRotationMultiplier = var12;
      this.particleCollision = var13;
      this.lightInfluence = var14;
      this.linearFiltering = var15;
      this.totalParticles = var16;
      this.lifeSpan = var17;
      this.maxConcurrentParticles = var18;
      this.particleLifeSpan = var19;
      this.spawnRate = var20;
      this.spawnBurst = var21;
      this.waveDelay = var22;
      this.initialVelocity = var23;
      this.velocityStretchMultiplier = var24;
      this.uvMotion = var25;
      this.attractors = var26;
      this.intersectionHighlight = var27;
   }

   class="kw">protected ParticleSpawner() {
   }

   @Nonnull
   class="kw">public com.hypixel.hytale.protocol.ParticleSpawner toPacket() {
      com.hypixel.hytale.protocol.ParticleSpawner var1 = this.cachedPacket == null ? null : this.cachedPacket.get();
      if (var1 != null) {
         class="kw">return var1;
      }

      com.hypixel.hytale.protocol.ParticleSpawner var2 = new com.hypixel.hytale.protocol.ParticleSpawner();
      var2.id = this.id;
      if (this.particle != null) {
         var2.particle = this.particle.toPacket();
      }

      var2.shape = this.shape;
      var2.renderMode = this.renderMode;
      var2.emitOffset = this.emitOffset;
      var2.useEmitDirection = this.useEmitDirection;
      var2.cameraOffset = this.cameraOffset;
      var2.particleRotationInfluence = this.particleRotationInfluence;
      var2.particleRotateWithSpawner = this.particleRotateWithSpawner;
      var2.isLowRes = this.isLowRes;
      var2.trailSpawnerPositionMultiplier = this.trailSpawnerPositionMultiplier;
      var2.trailSpawnerRotationMultiplier = this.trailSpawnerRotationMultiplier;
      if (this.particleCollision != null) {
         var2.particleCollision = this.particleCollision.toPacket();
         if (this.particleCollision.getParticleRotationInfluence() == null) {
            var2.particleCollision.particleRotationInfluence = this.particleRotationInfluence;
         }
      }

      var2.lightInfluence = this.lightInfluence;
      var2.linearFiltering = this.linearFiltering;
      var2.totalParticles = this.totalParticles;
      var2.lifeSpan = this.lifeSpan;
      var2.maxConcurrentParticles = this.maxConcurrentParticles;
      if (this.particleLifeSpan != null) {
         var2.particleLifeSpan = this.particleLifeSpan;
      }

      if (this.spawnRate != null) {
         var2.spawnRate = this.spawnRate;
      }

      var2.spawnBurst = this.spawnBurst;
      if (this.waveDelay != null) {
         var2.waveDelay = this.waveDelay;
      }

      var2.initialVelocity = this.initialVelocity;
      var2.velocityStretchMultiplier = this.velocityStretchMultiplier;
      var2.uvMotion = this.uvMotion;
      if (this.attractors != null && this.attractors.length > 0) {
         var2.attractors = ArrayUtil.copyAndMutate(this.attractors, ParticleAttractor::toPacket, com.hypixel.hytale.protocol.ParticleAttractor[]::new);
      }

      var2.intersectionHighlight = this.intersectionHighlight;
      this.cachedPacket = new SoftReference<>(var2);
      class="kw">return var2;
   }

   class="kw">public String getId() {
      class="kw">return this.id;
   }

   class="kw">public Particle getParticle() {
      class="kw">return this.particle;
   }

   class="kw">public FXRenderMode getRenderMode() {
      class="kw">return this.renderMode;
   }

   class="kw">public EmitShape getShape() {
      class="kw">return this.shape;
   }

   class="kw">public RangeVector3f getEmitOffset() {
      class="kw">return this.emitOffset;
   }

   class="kw">public boolean getUseEmitDirection() {
      class="kw">return this.useEmitDirection;
   }

   class="kw">public float getCameraOffset() {
      class="kw">return this.cameraOffset;
   }

   class="kw">public ParticleRotationInfluence getParticleRotationInfluence() {
      class="kw">return this.particleRotationInfluence;
   }

   class="kw">public boolean isParticleRotateWithSpawner() {
      class="kw">return this.particleRotateWithSpawner;
   }

   class="kw">public boolean isLowRes() {
      class="kw">return this.isLowRes;
   }

   class="kw">public float getTrailSpawnerPositionMultiplier() {
      class="kw">return this.trailSpawnerPositionMultiplier;
   }

   class="kw">public float getTrailSpawnerRotationMultiplier() {
      class="kw">return this.trailSpawnerRotationMultiplier;
   }

   class="kw">public ParticleCollision getParticleCollision() {
      class="kw">return this.particleCollision;
   }

   class="kw">public float getLightInfluence() {
      class="kw">return this.lightInfluence;
   }

   class="kw">public boolean isLinearFiltering() {
      class="kw">return this.linearFiltering;
   }

   class="kw">public Range getTotalParticles() {
      class="kw">return this.totalParticles;
   }

   class="kw">public float getLifeSpan() {
      class="kw">return this.lifeSpan;
   }

   class="kw">public int getMaxConcurrentParticles() {
      class="kw">return this.maxConcurrentParticles;
   }

   class="kw">public Rangef getParticleLifeSpan() {
      class="kw">return this.particleLifeSpan;
   }

   class="kw">public Rangef getSpawnRate() {
      class="kw">return this.spawnRate;
   }

   class="kw">public boolean isSpawnBurst() {
      class="kw">return this.spawnBurst;
   }

   class="kw">public Rangef getWaveDelay() {
      class="kw">return this.waveDelay;
   }

   class="kw">public InitialVelocity getInitialVelocity() {
      class="kw">return this.initialVelocity;
   }

   class="kw">public float getVelocityStretchMultiplier() {
      class="kw">return this.velocityStretchMultiplier;
   }

   class="kw">public UVMotion getUVMotion() {
      class="kw">return this.uvMotion;
   }

   class="kw">public ParticleAttractor[] getAttractors() {
      class="kw">return this.attractors;
   }

   class="kw">public IntersectionHighlight getIntersectionHighlight() {
      class="kw">return this.intersectionHighlight;
   }

   @Nonnull
   @Override
   class="kw">public String toString() {
      class="kw">return "ParticleSpawner{id='"
         + this.id
         + "', particle='"
         + this.particle
         + ", renderMode="
         + this.renderMode
         + ", shape="
         + this.shape
         + ", emitOffset="
         + this.emitOffset
         + ", useEmitDirection="
         + this.useEmitDirection
         + ", cameraOffset="
         + this.cameraOffset
         + ", particleRotationInfluence="
         + this.particleRotationInfluence
         + ", particleRotateWithSpawner="
         + this.particleRotateWithSpawner
         + ", isLowRes="
         + this.isLowRes
         + ", trailSpawnerPositionMultiplier="
         + this.trailSpawnerPositionMultiplier
         + ", trailSpawnerRotationMultiplier="
         + this.trailSpawnerRotationMultiplier
         + ", particleCollision="
         + this.particleCollision
         + ", lightInfluence="
         + this.lightInfluence
         + ", linearFiltering="
         + this.linearFiltering
         + ", totalParticles="
         + this.totalParticles
         + ", lifeSpan="
         + this.lifeSpan
         + ", maxConcurrentParticles="
         + this.maxConcurrentParticles
         + ", particleLifeSpan="
         + this.particleLifeSpan
         + ", spawnRate="
         + this.spawnRate
         + ", spawnBurst="
         + this.spawnBurst
         + ", waveDelay="
         + this.waveDelay
         + ", initialVelocity="
         + this.initialVelocity
         + ", velocityStretchMultiplier="
         + this.velocityStretchMultiplier
         + ", uvMotion="
         + this.uvMotion
         + ", attractors="
         + Arrays.toString(this.attractors)
         + ", intersectionHighlight"
         + this.intersectionHighlight
         + "}";
   }
}