public class IntegerNBTHandler extends java.lang.Object implements INBTHandler<java.lang.Integer>
| Constructor and Description |
|---|
IntegerNBTHandler() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isClassValid(java.lang.Class<?> aClass)
Checks if the NBTHanlder can handle a class.
|
java.lang.Integer |
readFromNBT(net.minecraft.nbt.CompoundNBT compound,
java.lang.String name,
java.lang.Integer current)
Reads the value from the NBT to be stored in the Field.
|
boolean |
storeToNBT(net.minecraft.nbt.CompoundNBT compound,
java.lang.String name,
java.lang.Integer object)
Stores a value as the given name in the NBT.
|
public boolean isClassValid(java.lang.Class<?> aClass)
isClassValid in interface INBTHandler<java.lang.Integer>aClass - The class that wants to be checked.public boolean storeToNBT(@Nonnull
net.minecraft.nbt.CompoundNBT compound,
@Nonnull
java.lang.String name,
@Nonnull
java.lang.Integer object)
storeToNBT in interface INBTHandler<java.lang.Integer>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 java.lang.Integer readFromNBT(@Nonnull
net.minecraft.nbt.CompoundNBT compound,
@Nonnull
java.lang.String name,
@Nullable
java.lang.Integer current)
readFromNBT in interface INBTHandler<java.lang.Integer>compound - The NBT that stores all the information.name - The name of the object stored in the NBT.current - The current value of the object