@Override public void readNBT( Capability<ICustomData> capability, ICustomData instance, EnumFacing side, NBTBase nbt) { final NBTTagCompound tag = (NBTTagCompound) nbt; instance.setBound(tag.getBoolean("isBound")); instance.setSilenced(tag.getBoolean("isSilenced")); instance.setWarded(tag.getBoolean("isWarded")); instance.setDenounced(tag.getBoolean("isDenounced")); instance.setConfined(tag.getBoolean("isConfined")); }
@Override public NBTBase writeNBT( Capability<ICustomData> capability, ICustomData instance, EnumFacing side) { final NBTTagCompound tag = new NBTTagCompound(); tag.setBoolean("isBound", instance.isBound()); tag.setBoolean("isSilenced", instance.isSilenced()); tag.setBoolean("isWarded", instance.isWarded()); tag.setBoolean("isDenounced", instance.isDenounced()); tag.setBoolean("isConfined", instance.isConfined()); return tag; }