public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction) { EntityId = stream.ReadVarInt(); Title = stream.ReadString(); Location = stream.ReadPosition(); Direction = stream.ReadUInt8(); return mode; }
public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction) { EntityId = stream.ReadInt32(); Location = stream.ReadPosition(); return mode; }
public SpawnPaintingPacket(int entityId, string title, Position location, byte direction) { EntityId = entityId; Title = title; Location = location; Direction = direction; }
public UseBedPacket(int entityId, Position location) { EntityId = entityId; Location = location; }
public SpawnPositionPacket(Position location) { Location = location; }
public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction) { Location = stream.ReadPosition(); BlockType = stream.ReadVarInt(); return mode; }
// -- Note: For this packet and multiple block change, // -- Block IDs are encoded with id << 4 | data. // -- (id is highest 4 bits, lower 4 bits is metadata) public BlockChangePacket(Position location, int blockType, byte blockMetadata) { Location = location; BlockType = blockType; BlockMetadata = blockMetadata; }
public void WritePosition(Position value) { WriteUInt64(value.ToLong()); }