Class ParticleS2CPacket
java.lang.Object
net.minecraft.network.packet.s2c.play.ParticleS2CPacket
- All Implemented Interfaces:
Packet<ClientPlayPacketListener>
public class ParticleS2CPacket extends Object implements Packet<ClientPlayPacketListener>
-
Field Summary
Fields Modifier and Type Field Description private int
count
private boolean
longDistance
private float
offsetX
private float
offsetY
private float
offsetZ
private ParticleEffect
parameters
private float
speed
private double
x
private double
y
private double
z
-
Constructor Summary
Constructors Constructor Description ParticleS2CPacket()
ParticleS2CPacket(T parameters, boolean longDistance, double x, double y, double z, float offsetX, float offsetY, float offsetZ, float speed, int count)
-
Method Summary
Modifier and Type Method Description void
apply(ClientPlayPacketListener clientPlayPacketListener)
int
getCount()
float
getOffsetX()
float
getOffsetY()
float
getOffsetZ()
ParticleEffect
getParameters()
float
getSpeed()
double
getX()
double
getY()
double
getZ()
boolean
isLongDistance()
void
read(PacketByteBuf buf)
private <T extends ParticleEffect>
TreadParticleParameters(PacketByteBuf buf, ParticleType<T> type)
void
write(PacketByteBuf buf)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.network.Packet
isWritingErrorSkippable
-
Field Details
-
x
private double x -
y
private double y -
z
private double z -
offsetX
private float offsetX -
offsetY
private float offsetY -
offsetZ
private float offsetZ -
speed
private float speed -
count
private int count -
longDistance
private boolean longDistance -
parameters
-
-
Constructor Details
-
ParticleS2CPacket
public ParticleS2CPacket() -
ParticleS2CPacket
public ParticleS2CPacket(T parameters, boolean longDistance, double x, double y, double z, float offsetX, float offsetY, float offsetZ, float speed, int count)
-
-
Method Details
-
read
- Specified by:
read
in interfacePacket<ClientPlayPacketListener>
- Throws:
IOException
-
readParticleParameters
private <T extends ParticleEffect> T readParticleParameters(PacketByteBuf buf, ParticleType<T> type) -
write
- Specified by:
write
in interfacePacket<ClientPlayPacketListener>
- Throws:
IOException
-
isLongDistance
@Environment(CLIENT) public boolean isLongDistance() -
getX
@Environment(CLIENT) public double getX() -
getY
@Environment(CLIENT) public double getY() -
getZ
@Environment(CLIENT) public double getZ() -
getOffsetX
@Environment(CLIENT) public float getOffsetX() -
getOffsetY
@Environment(CLIENT) public float getOffsetY() -
getOffsetZ
@Environment(CLIENT) public float getOffsetZ() -
getSpeed
@Environment(CLIENT) public float getSpeed() -
getCount
@Environment(CLIENT) public int getCount() -
getParameters
-
apply
- Specified by:
apply
in interfacePacket<ClientPlayPacketListener>
-