public class TankNBTHandler extends java.lang.Object implements INBTHandler<net.minecraftforge.fluids.capability.templates.FluidTank>
| Constructor and Description |
|---|
TankNBTHandler() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isClassValid(java.lang.Class<?> aClass)
Checks if the NBTHandler can handle a class.
|
net.minecraftforge.fluids.capability.templates.FluidTank |
readFromNBT(net.minecraft.nbt.CompoundNBT compound,
java.lang.String name,
net.minecraftforge.fluids.capability.templates.FluidTank currentValue)
Reads the value from the NBT to be stored in the Field.
|
boolean |
storeToNBT(net.minecraft.nbt.CompoundNBT compound,
java.lang.String name,
net.minecraftforge.fluids.capability.templates.FluidTank object)
Stores a value as the given name in the NBT.
|
public boolean isClassValid(java.lang.Class<?> aClass)
INBTHandlerisClassValid in interface INBTHandler<net.minecraftforge.fluids.capability.templates.FluidTank>aClass - The class that wants to be checked.public boolean storeToNBT(@Nonnull
net.minecraft.nbt.CompoundNBT compound,
@Nonnull
java.lang.String name,
@Nonnull
net.minecraftforge.fluids.capability.templates.FluidTank object)
INBTHandlerstoreToNBT in interface INBTHandler<net.minecraftforge.fluids.capability.templates.FluidTank>compound - The NBT where the object needs to be stored.name - The name as it will be stored.object - The object value to be stored.public net.minecraftforge.fluids.capability.templates.FluidTank readFromNBT(@Nonnull
net.minecraft.nbt.CompoundNBT compound,
@Nonnull
java.lang.String name,
@Nullable
net.minecraftforge.fluids.capability.templates.FluidTank currentValue)
INBTHandlerreadFromNBT in interface INBTHandler<net.minecraftforge.fluids.capability.templates.FluidTank>compound - The NBT that stores all the information.name - The name of the object stored in the NBT.currentValue - The current value of the object