public static class FMLPlayMessages.SpawnEntity
extends java.lang.Object
SSpawnObjectPacket
or SSpawnMobPacket
To customize how your entity is created clientside (instead of using the default factory provided to the EntityType
)
see EntityType.Builder#setCustomClientFactory
.Modifier and Type | Field and Description |
---|---|
private PacketBuffer |
buf |
private Entity |
entity |
private int |
entityId |
private byte |
headYaw |
private byte |
pitch |
private double |
posX |
private double |
posY |
private double |
posZ |
private int |
typeId |
private java.util.UUID |
uuid |
private int |
velX |
private int |
velY |
private int |
velZ |
private byte |
yaw |
Modifier | Constructor and Description |
---|---|
(package private) |
SpawnEntity(Entity e) |
private |
SpawnEntity(int typeId,
int entityId,
java.util.UUID uuid,
double posX,
double posY,
double posZ,
byte pitch,
byte yaw,
byte headYaw,
int velX,
int velY,
int velZ,
PacketBuffer buf) |
Modifier and Type | Method and Description |
---|---|
static FMLPlayMessages.SpawnEntity |
decode(PacketBuffer buf) |
static void |
encode(FMLPlayMessages.SpawnEntity msg,
PacketBuffer buf) |
PacketBuffer |
getAdditionalData() |
Entity |
getEntity() |
int |
getEntityId() |
byte |
getHeadYaw() |
byte |
getPitch() |
double |
getPosX() |
double |
getPosY() |
double |
getPosZ() |
int |
getTypeId() |
java.util.UUID |
getUuid() |
int |
getVelX() |
int |
getVelY() |
int |
getVelZ() |
byte |
getYaw() |
static void |
handle(FMLPlayMessages.SpawnEntity msg,
java.util.function.Supplier<NetworkEvent.Context> ctx) |
private final Entity entity
private final int typeId
private final int entityId
private final java.util.UUID uuid
private final double posX
private final double posY
private final double posZ
private final byte pitch
private final byte yaw
private final byte headYaw
private final int velX
private final int velY
private final int velZ
private final PacketBuffer buf
SpawnEntity(Entity e)
private SpawnEntity(int typeId, int entityId, java.util.UUID uuid, double posX, double posY, double posZ, byte pitch, byte yaw, byte headYaw, int velX, int velY, int velZ, PacketBuffer buf)
public static void encode(FMLPlayMessages.SpawnEntity msg, PacketBuffer buf)
public static FMLPlayMessages.SpawnEntity decode(PacketBuffer buf)
public static void handle(FMLPlayMessages.SpawnEntity msg, java.util.function.Supplier<NetworkEvent.Context> ctx)
public Entity getEntity()
public int getTypeId()
public int getEntityId()
public java.util.UUID getUuid()
public double getPosX()
public double getPosY()
public double getPosZ()
public byte getPitch()
public byte getYaw()
public byte getHeadYaw()
public int getVelX()
public int getVelY()
public int getVelZ()
public PacketBuffer getAdditionalData()