コード例 #1
0
 @Override
 public void read(PacketDataSerializer s) {
   eid = s.readVarInt();
   type = s.readByte();
   location = new Location(s.readInt(), s.readInt(), s.readInt());
   data = new DataWatcher(s);
 }
コード例 #2
0
 @Override
 public void write(PacketDataSerializer s) {
   s.writeVarInt(eid);
   s.writeByte(type);
   s.writeInt(location.getBlockX());
   s.writeInt(location.getBlockY());
   s.writeInt(location.getBlockZ());
   data.write(s);
 }