private static class CapabilityFluidHandler.DefaultFluidHandlerStorage<T extends IFluidHandler> extends java.lang.Object implements Capability.IStorage<T>
Modifier | Constructor and Description |
---|---|
private |
DefaultFluidHandlerStorage() |
Modifier and Type | Method and Description |
---|---|
void |
readNBT(Capability<T> capability,
T instance,
EnumFacing side,
NBTBase nbt)
Read the capability instance from a NBT tag.
|
NBTBase |
writeNBT(Capability<T> capability,
T instance,
EnumFacing side)
Serialize the capability instance to a NBTTag.
|
public NBTBase writeNBT(Capability<T> capability, T instance, EnumFacing side)
Capability.IStorage
writeNBT
in interface Capability.IStorage<T extends IFluidHandler>
capability
- The Capability being stored.instance
- An instance of that capabilities interface.side
- The side of the object the instance is associated with.public void readNBT(Capability<T> capability, T instance, EnumFacing side, NBTBase nbt)
Capability.IStorage
readNBT
in interface Capability.IStorage<T extends IFluidHandler>
capability
- The Capability being stored.instance
- An instance of that capabilities interface.side
- The side of the object the instance is associated with.nbt
- A NBT holding the data. Must not be null, as doesn't make sense to call this function with nothing to read...