Package net.minecraft.client.particle
Class Particle
java.lang.Object
net.minecraft.client.particle.Particle
- Direct Known Subclasses:
ItemPickupParticle
,MobAppearanceParticle
,NoRenderParticle
,SingleQuadParticle
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
protected float
private AABB
protected float
protected float
protected float
protected float
protected float
protected float
protected boolean
private static final AABB
protected final ClientLevel
protected int
private static final double
protected boolean
protected float
protected final RandomSource
protected float
protected boolean
protected float
protected boolean
private boolean
protected double
protected double
protected double
protected double
protected double
protected double
protected double
protected double
protected double
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Particle
(ClientLevel level, double x, double y, double z) Particle
(ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) -
Method Summary
Modifier and TypeMethodDescriptionint
protected int
getLightColor
(float partialTick) getPos()
getRenderBoundingBox
(float partialTicks) Returns the bounding box that should be used for particle culling.abstract ParticleRenderType
boolean
isAlive()
void
move
(double x, double y, double z) void
remove()
abstract void
render
(VertexConsumer buffer, Camera camera, float partialTicks) scale
(float scale) protected void
setAlpha
(float alpha) Sets the particle alpha (float)void
setBoundingBox
(AABB bb) void
setColor
(float particleRed, float particleGreen, float particleBlue) void
setLifetime
(int particleLifeTime) protected void
void
setParticleSpeed
(double xd, double yd, double zd) void
setPos
(double x, double y, double z) setPower
(float multiplier) protected void
setSize
(float width, float height) void
tick()
toString()
-
Field Details
-
INITIAL_AABB
-
MAXIMUM_COLLISION_VELOCITY_SQUARED
private static final double MAXIMUM_COLLISION_VELOCITY_SQUARED -
level
-
xo
protected double xo -
yo
protected double yo -
zo
protected double zo -
x
protected double x -
y
protected double y -
z
protected double z -
xd
protected double xd -
yd
protected double yd -
zd
protected double zd -
bb
-
onGround
protected boolean onGround -
hasPhysics
protected boolean hasPhysics -
stoppedByCollision
private boolean stoppedByCollision -
removed
protected boolean removed -
bbWidth
protected float bbWidth -
bbHeight
protected float bbHeight -
random
-
age
protected int age -
lifetime
protected int lifetime -
gravity
protected float gravity -
rCol
protected float rCol -
gCol
protected float gCol -
bCol
protected float bCol -
alpha
protected float alpha -
roll
protected float roll -
oRoll
protected float oRoll -
friction
protected float friction -
speedUpWhenYMotionIsBlocked
protected boolean speedUpWhenYMotionIsBlocked
-
-
Constructor Details
-
Particle
-
Particle
public Particle(ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed)
-
-
Method Details
-
setPower
-
setParticleSpeed
public void setParticleSpeed(double xd, double yd, double zd) -
scale
-
setColor
public void setColor(float particleRed, float particleGreen, float particleBlue) -
setAlpha
protected void setAlpha(float alpha) Sets the particle alpha (float) -
setLifetime
public void setLifetime(int particleLifeTime) -
getLifetime
public int getLifetime() -
tick
public void tick() -
render
-
getRenderType
-
toString
-
remove
public void remove() -
setSize
protected void setSize(float width, float height) -
setPos
public void setPos(double x, double y, double z) -
move
public void move(double x, double y, double z) -
setLocationFromBoundingbox
protected void setLocationFromBoundingbox() -
getLightColor
protected int getLightColor(float partialTick) -
isAlive
public boolean isAlive() -
getBoundingBox
-
setBoundingBox
-
getParticleGroup
-
getRenderBoundingBox
Returns the bounding box that should be used for particle culling.AABB.INFINITE
can be returned for particles that should not be culled. -
getPos
-