@Override public void updateEntity() { super.updateEntity(); if (worldObj.getTotalWorldTime() % 100 == 1) { verifyGolem(); } }
@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()); } }
@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(); } }