Class ParticleTargeted

java.lang.Object
net.minecraft.client.particle.Particle
net.minecraft.client.particle.SingleQuadParticle
net.minecraft.client.particle.TextureSheetParticle
com.binaris.wizardry.api.client.particle.ParticleWizardry
com.binaris.wizardry.api.client.particle.ParticleTargeted
Direct Known Subclasses:
ParticleBeam, ParticleGuardianBeam, ParticleLightning

public abstract class ParticleTargeted extends ParticleWizardry
  • Field Details

    • targetX

      protected double targetX
    • targetY

      protected double targetY
    • targetZ

      protected double targetZ
    • targetVelX

      protected double targetVelX
    • targetVelY

      protected double targetVelY
    • targetVelZ

      protected double targetVelZ
    • length

      protected double length
    • target

      @Nullable protected @Nullable net.minecraft.world.entity.Entity target
  • Constructor Details

    • ParticleTargeted

      public ParticleTargeted(net.minecraft.client.multiplayer.ClientLevel world, double x, double y, double z, net.minecraft.client.particle.SpriteSet spriteProvider, boolean updateTextureOnTick)
  • Method Details

    • setTargetPosition

      public void setTargetPosition(double x, double y, double z)
      Sets the target position for this particle. This will cause it to stretch to touch the given position, if supported.
      Parameters:
      x - The x-coordinate of the target position.
      y - The y-coordinate of the target position.
      z - The z-coordinate of the target position.
    • setTargetVelocity

      public void setTargetVelocity(double vx, double vy, double vz)
      Sets the target point velocity for this particle. This will cause the position it stretches to touch to move at the given velocity.
      Parameters:
      vx - The x velocity of the target point.
      vy - The y velocity of the target point.
      vz - The z velocity of the target point.
    • setTargetEntity

      public void setTargetEntity(@Nullable @Nullable net.minecraft.world.entity.Entity target)
      Links this particle to the given target. This will cause it to stretch to touch the target, if supported.
      Parameters:
      target - The target to link to.
    • setLength

      public void setLength(double length)
      Sets the length of this particle. This will cause it to stretch to touch a point this distance along its linked entity's line of sight.
      Parameters:
      length - The length to set.
    • tick

      public void tick()
      Overrides:
      tick in class ParticleWizardry
    • updateEntityLinking

      protected void updateEntityLinking(float partialTicks)
      Overrides:
      updateEntityLinking in class ParticleWizardry
    • render

      public void render(@NotNull @NotNull com.mojang.blaze3d.vertex.VertexConsumer vertexConsumer, net.minecraft.client.Camera camera, float tickDelta)
      Overrides:
      render in class ParticleWizardry
    • shouldApplyOriginOffset

      protected boolean shouldApplyOriginOffset()
    • shouldApplyOriginOffsetInFirstPerson

      protected boolean shouldApplyOriginOffsetInFirstPerson()
    • draw

      protected abstract void draw(com.mojang.blaze3d.vertex.PoseStack stack, com.mojang.blaze3d.vertex.Tesselator tesselator, float length, float tickDelta)