Package net.minecraft.client.particle
Class Particle
java.lang.Object
net.minecraft.client.particle.Particle
- Direct Known Subclasses:
BillboardParticle,ElderGuardianParticle,ItemPickupParticle,NoRenderParticle
A client-side visual effect with position, velocity, collision, and additional render properties.
Each particle is typically rendered as a camera-facing texture quad.
provides this behavior, and most vanilla particles inherit from it.
invalid reference
net.minecraft.client.particle.SpriteBillboardParticle
If you would like a particle with no direct rendering effects, inherit from NoRenderParticle.
- Mappings:
Namespace Name named net/minecraft/client/particle/Particleintermediary net/minecraft/class_703official hcy
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected booleanprivate Boxprotected booleanprotected booleanprivate static final Boxprotected floatprotected doubleprotected doubleprotected doubleprivate static final doubleprotected intprotected booleanprotected final Randomprotected floatprotected floatprivate booleanprotected floatprotected doubleprotected doubleprotected doubleprotected final ClientWorldprotected doubleprotected doubleprotected double -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedParticle(ClientWorld world, double x, double y, double z) Particle(ClientWorld world, double x, double y, double z, double velocityX, double velocityY, double velocityZ) -
Method Summary
Modifier and TypeMethodDescriptionReturns the boundingBoxof this particle used for collision and movement logic.protected intgetBrightness(float tint) Returns the packed light level this particle should render at.getGroup()Returns the optional group that this particle belongs to.intReturns the maximum age, in ticks, of this particle.booleanisAlive()Returnsfalseif this particle is finished and should be removed from the parentParticleManager, otherwisetrueif the particle is still alive.voidmarkDead()Marks this particle as ready to be removed from the containingClientWorld.voidmove(double dx, double dy, double dz) Moves this particle by the specified delta amounts, re-positioning bounding boxes and adjusting movement for collision with the world.move(float speed) Multiplies this particle's current velocity by the targetspeedamount.protected voidscale(float scale) Scales the size of this particle by the givenscaleamount.voidsetBoundingBox(Box boundingBox) protected voidsetBoundingBoxSpacing(float spacingXZ, float spacingY) voidsetMaxAge(int maxAge) Sets the maximum age, in ticks, that this particle can exist for.voidsetPos(double x, double y, double z) Updates the position and bounding box of this particle to the targetx,y,zposition.voidsetVelocity(double velocityX, double velocityY, double velocityZ) Updates this particle's velocity to the target X, Y, and Z values.abstract ParticleTextureSheetvoidtick()Called each game tick (20 times per second), and should be used to do core particle logic, such as movement and collision.toString()
-
Field Details
-
EMPTY_BOUNDING_BOX
- Mappings:
Namespace Name Mixin selector named EMPTY_BOUNDING_BOXLnet/minecraft/client/particle/Particle;EMPTY_BOUNDING_BOX:Lnet/minecraft/util/math/Box;intermediary field_3860Lnet/minecraft/class_703;field_3860:Lnet/minecraft/class_238;official aLhcy;a:Lfoc;
-
MAX_SQUARED_COLLISION_CHECK_DISTANCE
private static final double MAX_SQUARED_COLLISION_CHECK_DISTANCE- Mappings:
Namespace Name Mixin selector named MAX_SQUARED_COLLISION_CHECK_DISTANCELnet/minecraft/client/particle/Particle;MAX_SQUARED_COLLISION_CHECK_DISTANCE:Dintermediary field_36193Lnet/minecraft/class_703;field_36193:Dofficial bLhcy;b:D
-
world
- Mappings:
Namespace Name Mixin selector named worldLnet/minecraft/client/particle/Particle;world:Lnet/minecraft/client/world/ClientWorld;intermediary field_3851Lnet/minecraft/class_703;field_3851:Lnet/minecraft/class_638;official jLhcy;j:Lgzn;
-
lastX
protected double lastX- Mappings:
Namespace Name Mixin selector named lastXLnet/minecraft/client/particle/Particle;lastX:Dintermediary field_3858Lnet/minecraft/class_703;field_3858:Dofficial kLhcy;k:D
-
lastY
protected double lastY- Mappings:
Namespace Name Mixin selector named lastYLnet/minecraft/client/particle/Particle;lastY:Dintermediary field_3838Lnet/minecraft/class_703;field_3838:Dofficial lLhcy;l:D
-
lastZ
protected double lastZ- Mappings:
Namespace Name Mixin selector named lastZLnet/minecraft/client/particle/Particle;lastZ:Dintermediary field_3856Lnet/minecraft/class_703;field_3856:Dofficial mLhcy;m:D
-
x
protected double x- Mappings:
Namespace Name Mixin selector named xLnet/minecraft/client/particle/Particle;x:Dintermediary field_3874Lnet/minecraft/class_703;field_3874:Dofficial nLhcy;n:D
-
y
protected double y- Mappings:
Namespace Name Mixin selector named yLnet/minecraft/client/particle/Particle;y:Dintermediary field_3854Lnet/minecraft/class_703;field_3854:Dofficial oLhcy;o:D
-
z
protected double z- Mappings:
Namespace Name Mixin selector named zLnet/minecraft/client/particle/Particle;z:Dintermediary field_3871Lnet/minecraft/class_703;field_3871:Dofficial pLhcy;p:D
-
velocityX
protected double velocityX- Mappings:
Namespace Name Mixin selector named velocityXLnet/minecraft/client/particle/Particle;velocityX:Dintermediary field_3852Lnet/minecraft/class_703;field_3852:Dofficial qLhcy;q:D
-
velocityY
protected double velocityY- Mappings:
Namespace Name Mixin selector named velocityYLnet/minecraft/client/particle/Particle;velocityY:Dintermediary field_3869Lnet/minecraft/class_703;field_3869:Dofficial rLhcy;r:D
-
velocityZ
protected double velocityZ- Mappings:
Namespace Name Mixin selector named velocityZLnet/minecraft/client/particle/Particle;velocityZ:Dintermediary field_3850Lnet/minecraft/class_703;field_3850:Dofficial sLhcy;s:D
-
boundingBox
- Mappings:
Namespace Name Mixin selector named boundingBoxLnet/minecraft/client/particle/Particle;boundingBox:Lnet/minecraft/util/math/Box;intermediary field_3872Lnet/minecraft/class_703;field_3872:Lnet/minecraft/class_238;official cLhcy;c:Lfoc;
-
onGround
protected boolean onGround- Mappings:
Namespace Name Mixin selector named onGroundLnet/minecraft/client/particle/Particle;onGround:Zintermediary field_3845Lnet/minecraft/class_703;field_3845:Zofficial tLhcy;t:Z
-
collidesWithWorld
protected boolean collidesWithWorld- Mappings:
Namespace Name Mixin selector named collidesWithWorldLnet/minecraft/client/particle/Particle;collidesWithWorld:Zintermediary field_3862Lnet/minecraft/class_703;field_3862:Zofficial uLhcy;u:Z
-
stopped
private boolean stopped- Mappings:
Namespace Name Mixin selector named stoppedLnet/minecraft/client/particle/Particle;stopped:Zintermediary field_21507Lnet/minecraft/class_703;field_21507:Zofficial dLhcy;d:Z
-
dead
protected boolean dead- Mappings:
Namespace Name Mixin selector named deadLnet/minecraft/client/particle/Particle;dead:Zintermediary field_3843Lnet/minecraft/class_703;field_3843:Zofficial vLhcy;v:Z
-
spacingXZ
protected float spacingXZ- Mappings:
Namespace Name Mixin selector named spacingXZLnet/minecraft/client/particle/Particle;spacingXZ:Fintermediary field_3849Lnet/minecraft/class_703;field_3849:Fofficial wLhcy;w:F
-
spacingY
protected float spacingY- Mappings:
Namespace Name Mixin selector named spacingYLnet/minecraft/client/particle/Particle;spacingY:Fintermediary field_3867Lnet/minecraft/class_703;field_3867:Fofficial xLhcy;x:F
-
random
- Mappings:
Namespace Name Mixin selector named randomLnet/minecraft/client/particle/Particle;random:Lnet/minecraft/util/math/random/Random;intermediary field_3840Lnet/minecraft/class_703;field_3840:Lnet/minecraft/class_5819;official yLhcy;y:Lbfq;
-
age
protected int age- Mappings:
Namespace Name Mixin selector named ageLnet/minecraft/client/particle/Particle;age:Iintermediary field_3866Lnet/minecraft/class_703;field_3866:Iofficial zLhcy;z:I
-
maxAge
protected int maxAge- Mappings:
Namespace Name Mixin selector named maxAgeLnet/minecraft/client/particle/Particle;maxAge:Iintermediary field_3847Lnet/minecraft/class_703;field_3847:Iofficial ALhcy;A:I
-
gravityStrength
protected float gravityStrength- Mappings:
Namespace Name Mixin selector named gravityStrengthLnet/minecraft/client/particle/Particle;gravityStrength:Fintermediary field_3844Lnet/minecraft/class_703;field_3844:Fofficial BLhcy;B:F
-
velocityMultiplier
protected float velocityMultiplier- Mappings:
Namespace Name Mixin selector named velocityMultiplierLnet/minecraft/client/particle/Particle;velocityMultiplier:Fintermediary field_28786Lnet/minecraft/class_703;field_28786:Fofficial CLhcy;C:F
-
ascending
protected boolean ascending- Mappings:
Namespace Name Mixin selector named ascendingLnet/minecraft/client/particle/Particle;ascending:Zintermediary field_28787Lnet/minecraft/class_703;field_28787:Zofficial DLhcy;D:Z
-
-
Constructor Details
-
Particle
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/client/particle/Particle;<init>(Lnet/minecraft/client/world/ClientWorld;DDD)Vintermediary <init>Lnet/minecraft/class_703;<init>(Lnet/minecraft/class_638;DDD)Vofficial <init>Lhcy;<init>(Lgzn;DDD)V
-
Particle
public Particle(ClientWorld world, double x, double y, double z, double velocityX, double velocityY, double velocityZ) - Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/client/particle/Particle;<init>(Lnet/minecraft/client/world/ClientWorld;DDDDDD)Vintermediary <init>Lnet/minecraft/class_703;<init>(Lnet/minecraft/class_638;DDDDDD)Vofficial <init>Lhcy;<init>(Lgzn;DDDDDD)V
-
-
Method Details
-
move
Multiplies this particle's current velocity by the targetspeedamount.- Parameters:
speed- the velocity multiplier to apply to this particle- Mappings:
Namespace Name Mixin selector named moveLnet/minecraft/client/particle/Particle;move(F)Lnet/minecraft/client/particle/Particle;intermediary method_3075Lnet/minecraft/class_703;method_3075(F)Lnet/minecraft/class_703;official cLhcy;c(F)Lhcy;
-
setVelocity
public void setVelocity(double velocityX, double velocityY, double velocityZ) Updates this particle's velocity to the target X, Y, and Z values.- Parameters:
velocityX- the new x-velocity of this particlevelocityY- the new y-velocity of this particlevelocityZ- the new z-velocity of this particle- Mappings:
Namespace Name Mixin selector named setVelocityLnet/minecraft/client/particle/Particle;setVelocity(DDD)Vintermediary method_34753Lnet/minecraft/class_703;method_34753(DDD)Vofficial bLhcy;b(DDD)V
-
scale
Scales the size of this particle by the givenscaleamount.- Parameters:
scale- the amount to scale this particle's size by- Returns:
- this particle
- Mappings:
Namespace Name Mixin selector named scaleLnet/minecraft/client/particle/Particle;scale(F)Lnet/minecraft/client/particle/Particle;intermediary method_3087Lnet/minecraft/class_703;method_3087(F)Lnet/minecraft/class_703;official dLhcy;d(F)Lhcy;
-
setMaxAge
public void setMaxAge(int maxAge) Sets the maximum age, in ticks, that this particle can exist for.- Parameters:
maxAge- the new maximum age of this particle, in ticks- Mappings:
Namespace Name Mixin selector named setMaxAgeLnet/minecraft/client/particle/Particle;setMaxAge(I)Vintermediary method_3077Lnet/minecraft/class_703;method_3077(I)Vofficial aLhcy;a(I)V
-
getMaxAge
public int getMaxAge()Returns the maximum age, in ticks, of this particle. If this particle's age exceeds this value, it will be removed from the world.- Returns:
- the maximum age, in ticks, of this particle
- Mappings:
Namespace Name Mixin selector named getMaxAgeLnet/minecraft/client/particle/Particle;getMaxAge()Iintermediary method_3082Lnet/minecraft/class_703;method_3082()Iofficial jLhcy;j()I
-
tick
public void tick()Called each game tick (20 times per second), and should be used to do core particle logic, such as movement and collision.- Mappings:
Namespace Name Mixin selector named tickLnet/minecraft/client/particle/Particle;tick()Vintermediary method_3070Lnet/minecraft/class_703;method_3070()Vofficial aLhcy;a()V
-
textureSheet
- Mappings:
Namespace Name Mixin selector named textureSheetLnet/minecraft/client/particle/Particle;textureSheet()Lnet/minecraft/client/particle/ParticleTextureSheet;intermediary method_74274Lnet/minecraft/class_703;method_74274()Lnet/minecraft/class_3999;official bj_Lhcy;bj_()Lhdd;
-
toString
-
markDead
public void markDead()Marks this particle as ready to be removed from the containingClientWorld.- Mappings:
Namespace Name Mixin selector named markDeadLnet/minecraft/client/particle/Particle;markDead()Vintermediary method_3085Lnet/minecraft/class_703;method_3085()Vofficial kLhcy;k()V
-
setBoundingBoxSpacing
protected void setBoundingBoxSpacing(float spacingXZ, float spacingY) - Mappings:
Namespace Name Mixin selector named setBoundingBoxSpacingLnet/minecraft/client/particle/Particle;setBoundingBoxSpacing(FF)Vintermediary method_3080Lnet/minecraft/class_703;method_3080(FF)Vofficial bLhcy;b(FF)V
-
setPos
public void setPos(double x, double y, double z) Updates the position and bounding box of this particle to the targetx,y,zposition.- Parameters:
x- the x position to move this particle toy- the y position to move this particle toz- the z position to move this particle to- Mappings:
Namespace Name Mixin selector named setPosLnet/minecraft/client/particle/Particle;setPos(DDD)Vintermediary method_3063Lnet/minecraft/class_703;method_3063(DDD)Vofficial cLhcy;c(DDD)V
-
move
public void move(double dx, double dy, double dz) Moves this particle by the specified delta amounts, re-positioning bounding boxes and adjusting movement for collision with the world.- Parameters:
dx- the delta x to move this particle bydy- the delta y to move this particle bydz- the delta z to move this particle by- Mappings:
Namespace Name Mixin selector named moveLnet/minecraft/client/particle/Particle;move(DDD)Vintermediary method_3069Lnet/minecraft/class_703;method_3069(DDD)Vofficial aLhcy;a(DDD)V
-
repositionFromBoundingBox
protected void repositionFromBoundingBox()- Mappings:
Namespace Name Mixin selector named repositionFromBoundingBoxLnet/minecraft/client/particle/Particle;repositionFromBoundingBox()Vintermediary method_3072Lnet/minecraft/class_703;method_3072()Vofficial lLhcy;l()V
-
getBrightness
protected int getBrightness(float tint) Returns the packed light level this particle should render at.- Returns:
- the packed light level this particle should render at
- See Also:
- Mappings:
Namespace Name Mixin selector named getBrightnessLnet/minecraft/client/particle/Particle;getBrightness(F)Iintermediary method_3068Lnet/minecraft/class_703;method_3068(F)Iofficial aLhcy;a(F)I
-
isAlive
public boolean isAlive()Returnsfalseif this particle is finished and should be removed from the parentParticleManager, otherwisetrueif the particle is still alive.- Returns:
falseif this particle is finished and should be removed from the parentParticleManager, otherwisetrueif the particle is still alive- Mappings:
Namespace Name Mixin selector named isAliveLnet/minecraft/client/particle/Particle;isAlive()Zintermediary method_3086Lnet/minecraft/class_703;method_3086()Zofficial mLhcy;m()Z
-
getBoundingBox
Returns the boundingBoxof this particle used for collision and movement logic.By default, this bounding box is automatically repositioned when a particle moves in
tick(). To adjust the size of the returned box, visitsetBoundingBoxSpacing(float, float). To directly update the current bounding box, visitsetBoundingBox(Box);- Returns:
- the bounding
Boxof this particle used for collision and movement logic - Mappings:
Namespace Name Mixin selector named getBoundingBoxLnet/minecraft/client/particle/Particle;getBoundingBox()Lnet/minecraft/util/math/Box;intermediary method_3064Lnet/minecraft/class_703;method_3064()Lnet/minecraft/class_238;official nLhcy;n()Lfoc;
-
setBoundingBox
- Mappings:
Namespace Name Mixin selector named setBoundingBoxLnet/minecraft/client/particle/Particle;setBoundingBox(Lnet/minecraft/util/math/Box;)Vintermediary method_3067Lnet/minecraft/class_703;method_3067(Lnet/minecraft/class_238;)Vofficial aLhcy;a(Lfoc;)V
-
getGroup
Returns the optional group that this particle belongs to.A particle group restricts the number of particles from the group that can be rendered in a client world. If the particle does not have a group, it is not restricted.
- Returns:
- the optional group that this particle belongs to
- Mappings:
Namespace Name Mixin selector named getGroupLnet/minecraft/client/particle/Particle;getGroup()Ljava/util/Optional;intermediary method_34019Lnet/minecraft/class_703;method_34019()Ljava/util/Optional;official oLhcy;o()Ljava/util/Optional;
-