Package foundry.veil.api.quasar.data
Class QuasarParticleData
java.lang.Object
foundry.veil.api.quasar.data.QuasarParticleData
Data passed to each particle when it is created.
This class is used to store all the data that is passed to each particle when it is created. This includes the particle settings, whether or not the particle should collide with blocks, whether or not the particle should face its velocity, and the list of sub emitters.
This class also stores the list of particle modules that are applied to each particle. These modules are used to modify the particle's behavior. The following are valid particle modules:
- Init Modules - Applied when a particle is created
- Update Modules - Applied at the beginning of the particle tick
- Collision Modules - Applied when the particle collides with a block or entity
- Force Modules - Applied each physics tick to update velocity
- Render Modules - Applied when the particle is rendered
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<net.minecraft.core.Holder<QuasarParticleData>> static final com.mojang.serialization.Codec<QuasarParticleData> -
Constructor Summary
ConstructorsConstructorDescriptionQuasarParticleData(boolean shouldCollide, boolean faceVelocity, float velocityStretchFactor, List<net.minecraft.core.Holder<ParticleModuleData>> modules, @Nullable SpriteData spriteData, boolean additive, RenderStyle renderStyle) -
Method Summary
Modifier and TypeMethodDescriptionbooleanadditive()booleanbooleanList<net.minecraft.core.Holder<ParticleModuleData>> Deprecated.@Nullable net.minecraft.resources.ResourceLocationinthashCode()@UnmodifiableView List<net.minecraft.core.Holder<ParticleModuleData>> modules()voidsetAdditive(boolean additive) voidsetFaceVelocity(boolean faceVelocity) voidsetRenderStyle(RenderStyle renderStyle) voidsetShouldCollide(boolean shouldCollide) voidsetSpriteData(@Nullable SpriteData data) voidsetVelocityStretchFactor(float velocityStretchFactor) boolean@Nullable SpriteDatatoString()float
-
Field Details
-
DIRECT_CODEC
-
CODEC
public static final com.mojang.serialization.Codec<net.minecraft.core.Holder<QuasarParticleData>> CODEC
-
-
Constructor Details
-
QuasarParticleData
public QuasarParticleData(boolean shouldCollide, boolean faceVelocity, float velocityStretchFactor, List<net.minecraft.core.Holder<ParticleModuleData>> modules, @Nullable @Nullable SpriteData spriteData, boolean additive, RenderStyle renderStyle)
-
-
Method Details
-
getRegistryId
@Nullable public @Nullable net.minecraft.resources.ResourceLocation getRegistryId() -
shouldCollide
public boolean shouldCollide() -
setShouldCollide
public void setShouldCollide(boolean shouldCollide) - Since:
- 4.3.0
-
faceVelocity
public boolean faceVelocity() -
setFaceVelocity
public void setFaceVelocity(boolean faceVelocity) - Since:
- 4.3.0
-
velocityStretchFactor
public float velocityStretchFactor() -
setVelocityStretchFactor
public void setVelocityStretchFactor(float velocityStretchFactor) - Since:
- 4.3.0
-
getAllModules
@ScheduledForRemoval(inVersion="5.0.0") @Deprecated public List<net.minecraft.core.Holder<ParticleModuleData>> getAllModules()Deprecated.Usemodules()instead- Returns:
- A list containing all modules in the particle
- Since:
- 1.3.0
-
modules
-
spriteData
-
setSpriteData
- Since:
- 4.3.0
-
additive
public boolean additive() -
setAdditive
public void setAdditive(boolean additive) - Since:
- 4.3.0
-
renderStyle
-
setRenderStyle
- Since:
- 4.3.0
-
equals
-
hashCode
public int hashCode() -
toString
-
modules()instead