コード例 #1
0
 @Override
 public void updateEntity() {
   super.updateEntity();
   if (worldObj.getTotalWorldTime() % 100 == 1) {
     verifyGolem();
   }
 }
コード例 #2
0
 @Override
 public void writeCustomNBT(NBTTagCompound cmp) {
   super.writeCustomNBT(cmp);
   if (golemConnected != null) {
     cmp.setLong(TAG_UUID_MOST, golemConnected.getMostSignificantBits());
     cmp.setLong(TAG_UUID_LEAST, golemConnected.getLeastSignificantBits());
   }
 }
コード例 #3
0
 @Override
 public void readCustomNBT(NBTTagCompound cmp) {
   super.readCustomNBT(cmp);
   if (cmp.hasKey(TAG_UUID_LEAST) && cmp.hasKey(TAG_UUID_MOST)) {
     golemConnected = new UUID(cmp.getLong(TAG_UUID_MOST), cmp.getLong(TAG_UUID_LEAST));
     // verifyGolem();
   }
 }