Class SparkParticleBehavior

java.lang.Object
team.lodestar.lodestone.systems.particle.world.behaviors.SparkParticleBehavior
All Implemented Interfaces:
LodestoneParticleBehavior

public class SparkParticleBehavior extends Object implements 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 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

      public static SparkParticleBehavior sparkBehavior()
    • setForcedDirection

      public SparkParticleBehavior setForcedDirection(net.minecraft.world.phys.Vec3 forcedDirection)
      Defines a static direction for the particle to aim towards instead, regardless of velocity
    • setLengthCenter

      public SparkParticleBehavior setLengthCenter(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 backwards
    • tick

      public void tick(LodestoneWorldParticle particle)
      Specified by:
      tick in interface LodestoneParticleBehavior
    • render

      public void render(LodestoneWorldParticle particle, com.mojang.blaze3d.vertex.VertexConsumer consumer, net.minecraft.client.Camera camera, float partialTicks)
      Specified by:
      render in interface LodestoneParticleBehavior
    • getDirection

      public net.minecraft.world.phys.Vec3 getDirection(LodestoneWorldParticle particle)
    • 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)