Пример #1
0
 @Override
 public void writeEntityToNBT(NBTTagCompound nbt) {
   super.writeEntityToNBT(nbt);
   nbt.setShort("Fuse", (short) this.fuseTicks);
   if (ex != null) {
     nbt.setString("ex", ex.getID());
     nbt.setDouble("size", ex_size);
     if (ex_data != null) nbt.setTag("ex_data", ex_data);
   }
 }
Пример #2
0
 @Override
 public void writeSpawnData(ByteBuf buffer) {
   buffer.writeBoolean(ex != null);
   if (ex != null) {
     ByteBufUtils.writeUTF8String(buffer, ex.getID());
     if (ex_data != null) {
       ByteBufUtils.writeTag(buffer, ex_data);
     } else {
       ByteBufUtils.writeTag(buffer, new NBTTagCompound());
     }
   }
 }