Exemplo n.º 1
0
 public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     EntityId = stream.ReadVarInt();
     Title = stream.ReadString();
     Location = stream.ReadPosition();
     Direction = stream.ReadUInt8();
     return mode;
 }
Exemplo n.º 2
0
 public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     EntityId = stream.ReadInt32();
     Location = stream.ReadPosition();
     return mode;
 }
Exemplo n.º 3
0
 public SpawnPaintingPacket(int entityId, string title, Position location,
     byte direction)
 {
     EntityId = entityId;
     Title = title;
     Location = location;
     Direction = direction;
 }
Exemplo n.º 4
0
 public UseBedPacket(int entityId, Position location)
 {
     EntityId = entityId;
     Location = location;
 }
Exemplo n.º 5
0
 public SpawnPositionPacket(Position location) {
     Location = location;
 }
Exemplo n.º 6
0
 public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction) {
     Location = stream.ReadPosition();
     BlockType = stream.ReadVarInt();
     return mode;
 }
Exemplo n.º 7
0
 // -- 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;
 }
Exemplo n.º 8
0
 public void WritePosition(Position value) {
     WriteUInt64(value.ToLong());
 }