Class ClientboundAddEntityPacket
java.lang.Object
net.minecraft.network.protocol.game.ClientboundAddEntityPacket
- All Implemented Interfaces:
Packet<ClientGamePacketListener>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final intprivate final Vec3static final StreamCodec<RegistryFriendlyByteBuf, ClientboundAddEntityPacket> private final EntityType<?> private final UUIDprivate final doubleprivate final byteprivate final doubleprivate final byteprivate final byteprivate final double -
Constructor Summary
ConstructorsModifierConstructorDescriptionClientboundAddEntityPacket(int id, UUID uuid, double x, double y, double z, float xRot, float yRot, EntityType<?> type, int data, Vec3 movement, double yHeadRot) privateClientboundAddEntityPacket(Entity entity, int data, BlockPos pos) ClientboundAddEntityPacket(Entity entity, ServerEntity serverEntity) ClientboundAddEntityPacket(Entity entity, ServerEntity serverEntity, int data) -
Method Summary
Modifier and TypeMethodDescriptionintgetData()intgetId()EntityType<?> getType()getUUID()doublegetX()floatgetXRot()doublegetY()floatfloatgetYRot()doublegetZ()voidhandle(ClientGamePacketListener listener) Passes this Packet on to the NetHandler for processing.type()private voidwrite(RegistryFriendlyByteBuf output) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Packet
isSkippable, isTerminal
-
Field Details
-
STREAM_CODEC
-
id
private final int id -
uuid
-
type
-
x
private final double x -
y
private final double y -
z
private final double z -
movement
-
xRot
private final byte xRot -
yRot
private final byte yRot -
yHeadRot
private final byte yHeadRot -
data
private final int data
-
-
Constructor Details
-
ClientboundAddEntityPacket
-
ClientboundAddEntityPacket
-
ClientboundAddEntityPacket
-
ClientboundAddEntityPacket
public ClientboundAddEntityPacket(int id, UUID uuid, double x, double y, double z, float xRot, float yRot, EntityType<?> type, int data, Vec3 movement, double yHeadRot) -
ClientboundAddEntityPacket
-
-
Method Details
-
write
-
type
- Specified by:
typein interfacePacket<ClientGamePacketListener>
-
handle
Passes this Packet on to the NetHandler for processing.- Specified by:
handlein interfacePacket<ClientGamePacketListener>
-
getId
public int getId() -
getUUID
-
getType
-
getX
public double getX() -
getY
public double getY() -
getZ
public double getZ() -
getMovement
-
getXRot
public float getXRot() -
getYRot
public float getYRot() -
getYHeadRot
public float getYHeadRot() -
getData
public int getData()
-