Class SparkParticleBehavior
java.lang.Object
team.lodestar.lodestone.systems.particle.world.behaviors.SparkParticleBehavior
- All Implemented Interfaces:
LodestoneParticleBehavior
A particle behavior, renders as a moving spark that follows the velocity of the particle.
Can be configured to use a predefined direction instead.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.world.phys.Vec3protected net.minecraft.world.phys.Vec3protected floatstatic final net.minecraft.world.phys.Vec3 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.phys.Vec3getDirection(LodestoneWorldParticle particle) net.minecraft.world.phys.Vec3getEndPos(net.minecraft.world.phys.Vec3 pos, net.minecraft.world.phys.Vec3 offset) net.minecraft.world.phys.Vec3getStartPos(net.minecraft.world.phys.Vec3 pos, net.minecraft.world.phys.Vec3 offset) voidrender(LodestoneWorldParticle particle, com.mojang.blaze3d.vertex.VertexConsumer consumer, net.minecraft.client.Camera camera, float partialTicks) setForcedDirection(net.minecraft.world.phys.Vec3 forcedDirection) Defines a static direction for the particle to aim towards instead, regardless of velocitysetLengthCenter(float lengthCenter) Defines a weight center for the particle's length distribution to leverage off of Positive values cause the spark to extrude forward, whereas negative ones cause it to extrude backwards 0 causes an equal length distribution between forwards and backwardsstatic SparkParticleBehaviorvoidtick(LodestoneWorldParticle particle)
-
Field Details
-
UP
public static final net.minecraft.world.phys.Vec3 UP -
DOWN
public static final net.minecraft.world.phys.Vec3 DOWN -
forcedDirection
protected net.minecraft.world.phys.Vec3 forcedDirection -
lengthCenter
protected float lengthCenter
-
-
Constructor Details
-
SparkParticleBehavior
protected SparkParticleBehavior()
-
-
Method Details
-
sparkBehavior
-
setForcedDirection
Defines a static direction for the particle to aim towards instead, regardless of velocity -
setLengthCenter
Defines a weight center for the particle's length distribution to leverage off of Positive values cause the spark to extrude forward, whereas negative ones cause it to extrude backwards 0 causes an equal length distribution between forwards and backwards -
tick
- Specified by:
tickin interfaceLodestoneParticleBehavior
-
render
public void render(LodestoneWorldParticle particle, com.mojang.blaze3d.vertex.VertexConsumer consumer, net.minecraft.client.Camera camera, float partialTicks) - Specified by:
renderin interfaceLodestoneParticleBehavior
-
getDirection
-
getStartPos
public net.minecraft.world.phys.Vec3 getStartPos(net.minecraft.world.phys.Vec3 pos, net.minecraft.world.phys.Vec3 offset) -
getEndPos
public net.minecraft.world.phys.Vec3 getEndPos(net.minecraft.world.phys.Vec3 pos, net.minecraft.world.phys.Vec3 offset)
-