Class CapabilityFluidHandler.DefaultFluidHandlerStorage<T extends IFluidHandler>
java.lang.Object
net.minecraftforge.fluids.capability.CapabilityFluidHandler.DefaultFluidHandlerStorage<T>
- All Implemented Interfaces:
Capability.IStorage<T>
- Enclosing class:
- CapabilityFluidHandler
private static class CapabilityFluidHandler.DefaultFluidHandlerStorage<T extends IFluidHandler>
extends Object
implements Capability.IStorage<T>
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
DefaultFluidHandlerStorage
private DefaultFluidHandlerStorage()
-
-
Method Details
-
writeNBT
Description copied from interface:Capability.IStorage
Serialize the capability instance to a NBTTag. This allows for a central implementation of saving the data. It is important to note that it is up to the API defining the capability what requirements the 'instance' value must have. Due to the possibility of manipulating internal data, some implementations MAY require that the 'instance' be an instance of the 'default' implementation. Review the API docs for more info.- Specified by:
writeNBT
in interfaceCapability.IStorage<T extends IFluidHandler>
- Parameters:
capability
- The Capability being stored.instance
- An instance of that capabilities interface.side
- The side of the object the instance is associated with.- Returns:
- a NBT holding the data. Null if no data needs to be stored.
-
readNBT
Description copied from interface:Capability.IStorage
Read the capability instance from a NBT tag. This allows for a central implementation of saving the data. It is important to note that it is up to the API defining the capability what requirements the 'instance' value must have. Due to the possibility of manipulating internal data, some implementations MAY require that the 'instance' be an instance of the 'default' implementation. Review the API docs for more info. *- Specified by:
readNBT
in interfaceCapability.IStorage<T extends IFluidHandler>
- Parameters:
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...
-