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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected doubleprotected @Nullable net.minecraft.world.entity.Entityprotected doubleprotected doubleprotected doubleprotected doubleprotected doubleprotected doubleFields inherited from class com.binaris.wizardry.api.client.particle.ParticleWizardry
adjustQuadSize, angle, entity, fadeBlue, fadeGreen, fadeRed, initialBlue, initialGreen, initialRed, pitch, PROVIDERS, radius, random, relativeMotionX, relativeMotionY, relativeMotionZ, relativeX, relativeY, relativeZ, seed, shaded, speed, yawFields inherited from class net.minecraft.client.particle.TextureSheetParticle
spriteFields inherited from class net.minecraft.client.particle.SingleQuadParticle
quadSizeFields inherited from class net.minecraft.client.particle.Particle
age, alpha, bbHeight, bbWidth, bCol, friction, gCol, gravity, hasPhysics, level, lifetime, onGround, oRoll, rCol, removed, roll, speedUpWhenYMotionIsBlocked, x, xd, xo, y, yd, yo, z, zd, zo -
Constructor Summary
ConstructorsConstructorDescriptionParticleTargeted(net.minecraft.client.multiplayer.ClientLevel world, double x, double y, double z, net.minecraft.client.particle.SpriteSet spriteProvider, boolean updateTextureOnTick) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voiddraw(com.mojang.blaze3d.vertex.PoseStack stack, com.mojang.blaze3d.vertex.Tesselator tesselator, float length, float tickDelta) voidrender(@NotNull com.mojang.blaze3d.vertex.VertexConsumer vertexConsumer, net.minecraft.client.Camera camera, float tickDelta) voidsetLength(double length) Sets the length of this particle.voidsetTargetEntity(@Nullable net.minecraft.world.entity.Entity target) Links this particle to the given target.voidsetTargetPosition(double x, double y, double z) Sets the target position for this particle.voidsetTargetVelocity(double vx, double vy, double vz) Sets the target point velocity for this particle.protected booleanprotected booleanvoidtick()protected voidupdateEntityLinking(float partialTicks) Methods inherited from class com.binaris.wizardry.api.client.particle.ParticleWizardry
drawParticle, getLightColor, getRenderType, move, setCollisions, setColor, setEntity, setFacing, setFadeColour, setGravity, setParticleSpeed, setSeed, setShaded, setSpinMethods inherited from class net.minecraft.client.particle.TextureSheetParticle
getU0, getU1, getV0, getV1, pickSprite, setSprite, setSpriteFromAgeMethods inherited from class net.minecraft.client.particle.SingleQuadParticle
getQuadSize, scaleMethods inherited from class net.minecraft.client.particle.Particle
getBoundingBox, getLifetime, getParticleGroup, isAlive, remove, setAlpha, setBoundingBox, setLifetime, setLocationFromBoundingbox, setPos, setPower, setSize, toString
-
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:
tickin classParticleWizardry
-
updateEntityLinking
protected void updateEntityLinking(float partialTicks) - Overrides:
updateEntityLinkingin classParticleWizardry
-
render
public void render(@NotNull @NotNull com.mojang.blaze3d.vertex.VertexConsumer vertexConsumer, net.minecraft.client.Camera camera, float tickDelta) - Overrides:
renderin classParticleWizardry
-
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)
-