Class Particle
- Direct Known Subclasses:
- BillboardParticle,- ElderGuardianAppearanceParticle,- ItemPickupParticle,- NoRenderParticle
 Each particle is typically rendered as a camera-facing texture quad.
 SpriteBillboardParticle provides this behavior, and most vanilla particles inherit from it.
 
 If you would like a particle with no direct rendering effects, inherit from NoRenderParticle.
- Mappings:
- Namespace - Name - official - fhm- intermediary - net/minecraft/class_703- named - net/minecraft/client/particle/Particle
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected intprotected floatprotected floatprotected booleanprotected floatprivate Boxprotected booleanprotected booleanprivate static final Boxprotected floatprotected floatprivate static final doubleprotected intprotected booleanprotected floatprotected doubleprotected doubleprotected doubleprotected final Randomprotected floatprotected floatprotected floatprivate booleanprotected floatprotected doubleprotected doubleprotected doubleprotected final ClientWorldprotected doubleprotected doubleprotected double
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedParticle(ClientWorld world, double x, double y, double z) Particle(ClientWorld world, double x, double y, double z, double velocityX, double velocityY, double velocityZ) 
- 
Method SummaryModifier and TypeMethodDescriptionabstract voidbuildGeometry(VertexConsumer vertexConsumer, Camera camera, float tickDelta) Renders this particle to the givenVertexConsumerbuffer.Returns 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.abstract ParticleTextureSheetgetType()Returns the rendering category this particle is rendered under.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.protected voidsetAlpha(float alpha) Updates the alpha value of this particle to use while rendering.voidsetBoundingBox(Box boundingBox) protected voidsetBoundingBoxSpacing(float spacingXZ, float spacingY) voidsetColor(float red, float green, float blue) Updates the rendering color of this particle.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.voidtick()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 - official - a- Lfhm;a:Leed;- intermediary - field_3860- Lnet/minecraft/class_703;field_3860:Lnet/minecraft/class_238;- named - EMPTY_BOUNDING_BOX- Lnet/minecraft/client/particle/Particle;EMPTY_BOUNDING_BOX:Lnet/minecraft/util/math/Box;
 
- 
MAX_SQUARED_COLLISION_CHECK_DISTANCEprivate static final double MAX_SQUARED_COLLISION_CHECK_DISTANCE- Mappings:
- Namespace - Name - Mixin selector - official - b- Lfhm;b:D- intermediary - field_36193- Lnet/minecraft/class_703;field_36193:D- named - MAX_SQUARED_COLLISION_CHECK_DISTANCE- Lnet/minecraft/client/particle/Particle;MAX_SQUARED_COLLISION_CHECK_DISTANCE:D
 
- 
world- Mappings:
- Namespace - Name - Mixin selector - official - c- Lfhm;c:Lfew;- intermediary - field_3851- Lnet/minecraft/class_703;field_3851:Lnet/minecraft/class_638;- named - world- Lnet/minecraft/client/particle/Particle;world:Lnet/minecraft/client/world/ClientWorld;
 
- 
prevPosXprotected double prevPosX- Mappings:
- Namespace - Name - Mixin selector - official - d- Lfhm;d:D- intermediary - field_3858- Lnet/minecraft/class_703;field_3858:D- named - prevPosX- Lnet/minecraft/client/particle/Particle;prevPosX:D
 
- 
prevPosYprotected double prevPosY- Mappings:
- Namespace - Name - Mixin selector - official - e- Lfhm;e:D- intermediary - field_3838- Lnet/minecraft/class_703;field_3838:D- named - prevPosY- Lnet/minecraft/client/particle/Particle;prevPosY:D
 
- 
prevPosZprotected double prevPosZ- Mappings:
- Namespace - Name - Mixin selector - official - f- Lfhm;f:D- intermediary - field_3856- Lnet/minecraft/class_703;field_3856:D- named - prevPosZ- Lnet/minecraft/client/particle/Particle;prevPosZ:D
 
- 
xprotected double x- Mappings:
- Namespace - Name - Mixin selector - official - g- Lfhm;g:D- intermediary - field_3874- Lnet/minecraft/class_703;field_3874:D- named - x- Lnet/minecraft/client/particle/Particle;x:D
 
- 
yprotected double y- Mappings:
- Namespace - Name - Mixin selector - official - h- Lfhm;h:D- intermediary - field_3854- Lnet/minecraft/class_703;field_3854:D- named - y- Lnet/minecraft/client/particle/Particle;y:D
 
- 
zprotected double z- Mappings:
- Namespace - Name - Mixin selector - official - i- Lfhm;i:D- intermediary - field_3871- Lnet/minecraft/class_703;field_3871:D- named - z- Lnet/minecraft/client/particle/Particle;z:D
 
- 
velocityXprotected double velocityX- Mappings:
- Namespace - Name - Mixin selector - official - j- Lfhm;j:D- intermediary - field_3852- Lnet/minecraft/class_703;field_3852:D- named - velocityX- Lnet/minecraft/client/particle/Particle;velocityX:D
 
- 
velocityYprotected double velocityY- Mappings:
- Namespace - Name - Mixin selector - official - k- Lfhm;k:D- intermediary - field_3869- Lnet/minecraft/class_703;field_3869:D- named - velocityY- Lnet/minecraft/client/particle/Particle;velocityY:D
 
- 
velocityZprotected double velocityZ- Mappings:
- Namespace - Name - Mixin selector - official - l- Lfhm;l:D- intermediary - field_3850- Lnet/minecraft/class_703;field_3850:D- named - velocityZ- Lnet/minecraft/client/particle/Particle;velocityZ:D
 
- 
boundingBox- Mappings:
- Namespace - Name - Mixin selector - official - D- Lfhm;D:Leed;- intermediary - field_3872- Lnet/minecraft/class_703;field_3872:Lnet/minecraft/class_238;- named - boundingBox- Lnet/minecraft/client/particle/Particle;boundingBox:Lnet/minecraft/util/math/Box;
 
- 
onGroundprotected boolean onGround- Mappings:
- Namespace - Name - Mixin selector - official - m- Lfhm;m:Z- intermediary - field_3845- Lnet/minecraft/class_703;field_3845:Z- named - onGround- Lnet/minecraft/client/particle/Particle;onGround:Z
 
- 
collidesWithWorldprotected boolean collidesWithWorld- Mappings:
- Namespace - Name - Mixin selector - official - n- Lfhm;n:Z- intermediary - field_3862- Lnet/minecraft/class_703;field_3862:Z- named - collidesWithWorld- Lnet/minecraft/client/particle/Particle;collidesWithWorld:Z
 
- 
stoppedprivate boolean stopped- Mappings:
- Namespace - Name - Mixin selector - official - E- Lfhm;E:Z- intermediary - field_21507- Lnet/minecraft/class_703;field_21507:Z- named - stopped- Lnet/minecraft/client/particle/Particle;stopped:Z
 
- 
deadprotected boolean dead- Mappings:
- Namespace - Name - Mixin selector - official - o- Lfhm;o:Z- intermediary - field_3843- Lnet/minecraft/class_703;field_3843:Z- named - dead- Lnet/minecraft/client/particle/Particle;dead:Z
 
- 
spacingXZprotected float spacingXZ- Mappings:
- Namespace - Name - Mixin selector - official - p- Lfhm;p:F- intermediary - field_3849- Lnet/minecraft/class_703;field_3849:F- named - spacingXZ- Lnet/minecraft/client/particle/Particle;spacingXZ:F
 
- 
spacingYprotected float spacingY- Mappings:
- Namespace - Name - Mixin selector - official - q- Lfhm;q:F- intermediary - field_3867- Lnet/minecraft/class_703;field_3867:F- named - spacingY- Lnet/minecraft/client/particle/Particle;spacingY:F
 
- 
random- Mappings:
- Namespace - Name - Mixin selector - official - r- Lfhm;r:Lapf;- intermediary - field_3840- Lnet/minecraft/class_703;field_3840:Lnet/minecraft/class_5819;- named - random- Lnet/minecraft/client/particle/Particle;random:Lnet/minecraft/util/math/random/Random;
 
- 
ageprotected int age- Mappings:
- Namespace - Name - Mixin selector - official - s- Lfhm;s:I- intermediary - field_3866- Lnet/minecraft/class_703;field_3866:I- named - age- Lnet/minecraft/client/particle/Particle;age:I
 
- 
maxAgeprotected int maxAge- Mappings:
- Namespace - Name - Mixin selector - official - t- Lfhm;t:I- intermediary - field_3847- Lnet/minecraft/class_703;field_3847:I- named - maxAge- Lnet/minecraft/client/particle/Particle;maxAge:I
 
- 
gravityStrengthprotected float gravityStrength- Mappings:
- Namespace - Name - Mixin selector - official - u- Lfhm;u:F- intermediary - field_3844- Lnet/minecraft/class_703;field_3844:F- named - gravityStrength- Lnet/minecraft/client/particle/Particle;gravityStrength:F
 
- 
redprotected float red- Mappings:
- Namespace - Name - Mixin selector - official - v- Lfhm;v:F- intermediary - field_3861- Lnet/minecraft/class_703;field_3861:F- named - red- Lnet/minecraft/client/particle/Particle;red:F
 
- 
greenprotected float green- Mappings:
- Namespace - Name - Mixin selector - official - w- Lfhm;w:F- intermediary - field_3842- Lnet/minecraft/class_703;field_3842:F- named - green- Lnet/minecraft/client/particle/Particle;green:F
 
- 
blueprotected float blue- Mappings:
- Namespace - Name - Mixin selector - official - x- Lfhm;x:F- intermediary - field_3859- Lnet/minecraft/class_703;field_3859:F- named - blue- Lnet/minecraft/client/particle/Particle;blue:F
 
- 
alphaprotected float alpha- Mappings:
- Namespace - Name - Mixin selector - official - y- Lfhm;y:F- intermediary - field_3841- Lnet/minecraft/class_703;field_3841:F- named - alpha- Lnet/minecraft/client/particle/Particle;alpha:F
 
- 
angleprotected float angle- Mappings:
- Namespace - Name - Mixin selector - official - z- Lfhm;z:F- intermediary - field_3839- Lnet/minecraft/class_703;field_3839:F- named - angle- Lnet/minecraft/client/particle/Particle;angle:F
 
- 
prevAngleprotected float prevAngle- Mappings:
- Namespace - Name - Mixin selector - official - A- Lfhm;A:F- intermediary - field_3857- Lnet/minecraft/class_703;field_3857:F- named - prevAngle- Lnet/minecraft/client/particle/Particle;prevAngle:F
 
- 
velocityMultiplierprotected float velocityMultiplier- Mappings:
- Namespace - Name - Mixin selector - official - B- Lfhm;B:F- intermediary - field_28786- Lnet/minecraft/class_703;field_28786:F- named - velocityMultiplier- Lnet/minecraft/client/particle/Particle;velocityMultiplier:F
 
- 
ascendingprotected boolean ascending- Mappings:
- Namespace - Name - Mixin selector - official - C- Lfhm;C:Z- intermediary - field_28787- Lnet/minecraft/class_703;field_28787:Z- named - ascending- Lnet/minecraft/client/particle/Particle;ascending:Z
 
 
- 
- 
Constructor Details- 
Particle- Mappings:
- Namespace - Name - Mixin selector - official - <init>- Lfhm;<init>(Lfew;DDD)V- intermediary - <init>- Lnet/minecraft/class_703;<init>(Lnet/minecraft/class_638;DDD)V- named - <init>- Lnet/minecraft/client/particle/Particle;<init>(Lnet/minecraft/client/world/ClientWorld;DDD)V
 
- 
Particlepublic Particle(ClientWorld world, double x, double y, double z, double velocityX, double velocityY, double velocityZ) - Mappings:
- Namespace - Name - Mixin selector - official - <init>- Lfhm;<init>(Lfew;DDDDDD)V- intermediary - <init>- Lnet/minecraft/class_703;<init>(Lnet/minecraft/class_638;DDDDDD)V- named - <init>- Lnet/minecraft/client/particle/Particle;<init>(Lnet/minecraft/client/world/ClientWorld;DDDDDD)V
 
 
- 
- 
Method Details- 
moveMultiplies this particle's current velocity by the targetspeedamount.- Parameters:
- speed- the velocity multiplier to apply to this particle
- Mappings:
- Namespace - Name - Mixin selector - official - c- Lfhm;c(F)Lfhm;- intermediary - method_3075- Lnet/minecraft/class_703;method_3075(F)Lnet/minecraft/class_703;- named - move- Lnet/minecraft/client/particle/Particle;move(F)Lnet/minecraft/client/particle/Particle;
 
- 
setVelocitypublic 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 particle
- velocityY- the new y-velocity of this particle
- velocityZ- the new z-velocity of this particle
- Mappings:
- Namespace - Name - Mixin selector - official - b- Lfhm;b(DDD)V- intermediary - method_34753- Lnet/minecraft/class_703;method_34753(DDD)V- named - setVelocity- Lnet/minecraft/client/particle/Particle;setVelocity(DDD)V
 
- 
scaleScales 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 - official - d- Lfhm;d(F)Lfhm;- intermediary - method_3087- Lnet/minecraft/class_703;method_3087(F)Lnet/minecraft/class_703;- named - scale- Lnet/minecraft/client/particle/Particle;scale(F)Lnet/minecraft/client/particle/Particle;
 
- 
setColorpublic void setColor(float red, float green, float blue) Updates the rendering color of this particle. Each value should be between 0.0 (no channel color) and 1.0 (full channel color).- Parameters:
- red- the target red color to use while rendering
- green- the target green color to use while rendering
- blue- the target blue color to use while rendering
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lfhm;a(FFF)V- intermediary - method_3084- Lnet/minecraft/class_703;method_3084(FFF)V- named - setColor- Lnet/minecraft/client/particle/Particle;setColor(FFF)V
 
- 
setAlphaprotected void setAlpha(float alpha) Updates the alpha value of this particle to use while rendering.Note that a particle cannot render with transparency unless getType()isParticleTextureSheet.PARTICLE_SHEET_TRANSLUCENT, or another sheet that supports transparency.Also note that the default particle shader (core/particle.fsh) will discard all transparent pixels below 0.1 alpha. - Parameters:
- alpha- the new alpha value of this particle
- Mappings:
- Namespace - Name - Mixin selector - official - e- Lfhm;e(F)V- intermediary - method_3083- Lnet/minecraft/class_703;method_3083(F)V- named - setAlpha- Lnet/minecraft/client/particle/Particle;setAlpha(F)V
 
- 
setMaxAgepublic 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 - official - a- Lfhm;a(I)V- intermediary - method_3077- Lnet/minecraft/class_703;method_3077(I)V- named - setMaxAge- Lnet/minecraft/client/particle/Particle;setMaxAge(I)V
 
- 
getMaxAgepublic 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 - official - j- Lfhm;j()I- intermediary - method_3082- Lnet/minecraft/class_703;method_3082()I- named - getMaxAge- Lnet/minecraft/client/particle/Particle;getMaxAge()I
 
- 
tickpublic 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 - official - a- Lfhm;a()V- intermediary - method_3070- Lnet/minecraft/class_703;method_3070()V- named - tick- Lnet/minecraft/client/particle/Particle;tick()V
 
- 
buildGeometryRenders this particle to the givenVertexConsumerbuffer.- Parameters:
- vertexConsumer- the buffer to render to
- camera- the current active game- Camera
- tickDelta- frame tick delta amount
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lfhm;a(Lein;Lemz;F)V- intermediary - method_3074- Lnet/minecraft/class_703;method_3074(Lnet/minecraft/class_4588;Lnet/minecraft/class_4184;F)V- named - buildGeometry- Lnet/minecraft/client/particle/Particle;buildGeometry(Lnet/minecraft/client/render/VertexConsumer;Lnet/minecraft/client/render/Camera;F)V
 
- 
getTypeReturns the rendering category this particle is rendered under.For more information on the properties and types available to each Particle, visitParticleTextureSheet.- Returns:
- the rendering category this particle is rendered under
- Mappings:
- Namespace - Name - Mixin selector - official - b- Lfhm;b()Lfhq;- intermediary - method_18122- Lnet/minecraft/class_703;method_18122()Lnet/minecraft/class_3999;- named - getType- Lnet/minecraft/client/particle/Particle;getType()Lnet/minecraft/client/particle/ParticleTextureSheet;
 
- 
toString
- 
markDeadpublic void markDead()Marks this particle as ready to be removed from the containingClientWorld.- Mappings:
- Namespace - Name - Mixin selector - official - k- Lfhm;k()V- intermediary - method_3085- Lnet/minecraft/class_703;method_3085()V- named - markDead- Lnet/minecraft/client/particle/Particle;markDead()V
 
- 
setBoundingBoxSpacingprotected void setBoundingBoxSpacing(float spacingXZ, float spacingY) - Mappings:
- Namespace - Name - Mixin selector - official - b- Lfhm;b(FF)V- intermediary - method_3080- Lnet/minecraft/class_703;method_3080(FF)V- named - setBoundingBoxSpacing- Lnet/minecraft/client/particle/Particle;setBoundingBoxSpacing(FF)V
 
- 
setPospublic 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 to
- y- the y position to move this particle to
- z- the z position to move this particle to
- Mappings:
- Namespace - Name - Mixin selector - official - c- Lfhm;c(DDD)V- intermediary - method_3063- Lnet/minecraft/class_703;method_3063(DDD)V- named - setPos- Lnet/minecraft/client/particle/Particle;setPos(DDD)V
 
- 
movepublic 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 by
- dy- the delta y to move this particle by
- dz- the delta z to move this particle by
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lfhm;a(DDD)V- intermediary - method_3069- Lnet/minecraft/class_703;method_3069(DDD)V- named - move- Lnet/minecraft/client/particle/Particle;move(DDD)V
 
- 
repositionFromBoundingBoxprotected void repositionFromBoundingBox()- Mappings:
- Namespace - Name - Mixin selector - official - l- Lfhm;l()V- intermediary - method_3072- Lnet/minecraft/class_703;method_3072()V- named - repositionFromBoundingBox- Lnet/minecraft/client/particle/Particle;repositionFromBoundingBox()V
 
- 
getBrightnessprotected 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 - official - a- Lfhm;a(F)I- intermediary - method_3068- Lnet/minecraft/class_703;method_3068(F)I- named - getBrightness- Lnet/minecraft/client/particle/Particle;getBrightness(F)I
 
- 
isAlivepublic 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 parent- ParticleManager, otherwise- trueif the particle is still alive
- Mappings:
- Namespace - Name - Mixin selector - official - m- Lfhm;m()Z- intermediary - method_3086- Lnet/minecraft/class_703;method_3086()Z- named - isAlive- Lnet/minecraft/client/particle/Particle;isAlive()Z
 
- 
getBoundingBoxReturns 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 - official - n- Lfhm;n()Leed;- intermediary - method_3064- Lnet/minecraft/class_703;method_3064()Lnet/minecraft/class_238;- named - getBoundingBox- Lnet/minecraft/client/particle/Particle;getBoundingBox()Lnet/minecraft/util/math/Box;
 
- 
setBoundingBox- Mappings:
- Namespace - Name - Mixin selector - official - a- Lfhm;a(Leed;)V- intermediary - method_3067- Lnet/minecraft/class_703;method_3067(Lnet/minecraft/class_238;)V- named - setBoundingBox- Lnet/minecraft/client/particle/Particle;setBoundingBox(Lnet/minecraft/util/math/Box;)V
 
- 
getGroupReturns 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 - official - o- Lfhm;o()Ljava/util/Optional;- intermediary - method_34019- Lnet/minecraft/class_703;method_34019()Ljava/util/Optional;- named - getGroup- Lnet/minecraft/client/particle/Particle;getGroup()Ljava/util/Optional;
 
 
-