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