T - The field class type.public abstract class NBTClassType<T>
extends java.lang.Object
EvilCraftTileEntity.NBTPersist| Modifier and Type | Field and Description |
|---|---|
static java.util.Map<java.lang.Class<?>,NBTClassType<?>> |
NBTYPES
A map of all the types to their persist actions.
|
| Constructor and Description |
|---|
NBTClassType() |
| Modifier and Type | Method and Description |
|---|---|
static void |
performActionForField(EvilCraftTileEntity tile,
java.lang.reflect.Field field,
net.minecraft.nbt.NBTTagCompound tag,
boolean write)
Perform a field persist action.
|
void |
persistedFieldAction(EvilCraftTileEntity tile,
java.lang.reflect.Field field,
net.minecraft.nbt.NBTTagCompound tag,
boolean write)
Called to read or write a field.
|
protected abstract T |
readPersistedField(java.lang.String name,
net.minecraft.nbt.NBTTagCompound tag) |
protected abstract void |
writePersistedField(java.lang.String name,
T object,
net.minecraft.nbt.NBTTagCompound tag) |
public static java.util.Map<java.lang.Class<?>,NBTClassType<?>> NBTYPES
public static void performActionForField(EvilCraftTileEntity tile, java.lang.reflect.Field field, net.minecraft.nbt.NBTTagCompound tag, boolean write)
tile - The tile entity that has the field.field - The field to persist or read.tag - The tag compound to read or write to.write - If there should be written, otherwise there will be read.public void persistedFieldAction(EvilCraftTileEntity tile, java.lang.reflect.Field field, net.minecraft.nbt.NBTTagCompound tag, boolean write) throws java.lang.IllegalAccessException
tile - The tile entity that has the field.field - The field to persist or read.tag - The tag compound to read or write to.write - If there should be written, otherwise there will be read.java.lang.IllegalArgumentException - Argument exception;java.lang.IllegalAccessException - Access exception;protected abstract void writePersistedField(java.lang.String name,
T object,
net.minecraft.nbt.NBTTagCompound tag)
protected abstract T readPersistedField(java.lang.String name, net.minecraft.nbt.NBTTagCompound tag)