public class NBTManager
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
java.util.List<INBTHandler> |
getHandlerList() |
static NBTManager |
getInstance() |
java.util.HashMap<java.lang.Class<? extends net.minecraft.tileentity.TileEntity>,java.util.List<java.lang.reflect.Field>> |
getTileFieldList() |
void |
readTileEntity(net.minecraft.tileentity.TileEntity entity,
net.minecraft.nbt.CompoundNBT compound)
Reads all the values from the NBTTagCompound and saves it to the Fields.
|
void |
scanTileClassForAnnotations(java.lang.Class<? extends net.minecraft.tileentity.TileEntity> entity)
Scans a
TileEntity class for Save. |
net.minecraft.nbt.CompoundNBT |
writeTileEntity(net.minecraft.tileentity.TileEntity entity,
net.minecraft.nbt.CompoundNBT compound)
Writes all the values that have
Save annotation to the NBTTagCompound. |
net.minecraft.nbt.CompoundNBT |
writeTileEntityObject(net.minecraft.tileentity.TileEntity entity,
java.lang.Object object,
net.minecraft.nbt.CompoundNBT compound)
Writes an specific object to be synced to the client
|
public static NBTManager getInstance()
public void scanTileClassForAnnotations(java.lang.Class<? extends net.minecraft.tileentity.TileEntity> entity)
TileEntity class for Save.entity - The TileEntity classpublic net.minecraft.nbt.CompoundNBT writeTileEntity(net.minecraft.tileentity.TileEntity entity,
net.minecraft.nbt.CompoundNBT compound)
Save annotation to the NBTTagCompound.entity - The tile entity instance.compound - The NBTTagCompound to save the values.public void readTileEntity(net.minecraft.tileentity.TileEntity entity,
net.minecraft.nbt.CompoundNBT compound)
entity - The tile entity instance.compound - The NBTTagCompound to save the values.public net.minecraft.nbt.CompoundNBT writeTileEntityObject(net.minecraft.tileentity.TileEntity entity,
java.lang.Object object,
net.minecraft.nbt.CompoundNBT compound)
entity - The tile entity instanceobject - The object to be syncedcompound - The NBTTagCompound to save the valuespublic java.util.List<INBTHandler> getHandlerList()
public java.util.HashMap<java.lang.Class<? extends net.minecraft.tileentity.TileEntity>,java.util.List<java.lang.reflect.Field>> getTileFieldList()