コード例 #1
0
 public static PixelmonMovesetDataPacket createPacket(NBTTagCompound nbt, int i) {
   if (nbt.getInteger("PixelmonNumberMoves") <= i) return null;
   PixelmonMovesetDataPacket p = new PixelmonMovesetDataPacket();
   p.attackName = nbt.getString("PixelmonMoveName" + i);
   p.type = EnumType.parseType(nbt.getInteger("PixelmonMoveType" + i));
   p.pp = nbt.getInteger("PixelmonMovePP" + i);
   p.ppBase = nbt.getInteger("PixelmonMovePPBase" + i);
   return p;
 }
コード例 #2
0
 public void readData(DataInputStream data) throws IOException {
   attackName = Packet.readString(data, 64);
   type = EnumType.parseType(data.readShort());
   pp = data.readShort();
   ppBase = data.readShort();
 }
コード例 #3
0
 public void writeData(DataOutputStream data) throws IOException {
   Packet.writeString(attackName, data);
   data.writeShort(type.getIndex());
   data.writeShort(pp);
   data.writeShort(ppBase);
 }