public abstract class StatementType<S extends IGuiSlot>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.lang.Class<S> |
clazz |
S |
defaultStatement |
Constructor and Description |
---|
StatementType(java.lang.Class<S> clazz,
S defaultStatement) |
Modifier and Type | Method and Description |
---|---|
abstract S |
convertToType(java.lang.Object value) |
abstract S |
readFromBuffer(PacketBufferBC buffer)
Reads a
StatementWrapper from the given PacketBufferBC . |
abstract S |
readFromNbt(net.minecraft.nbt.NBTTagCompound nbt)
Reads a
StatementWrapper from the given NBTTagCompound . |
abstract void |
writeToBuffer(PacketBufferBC buffer,
S slot) |
abstract net.minecraft.nbt.NBTTagCompound |
writeToNbt(S slot) |
public abstract S readFromNbt(net.minecraft.nbt.NBTTagCompound nbt)
StatementWrapper
from the given NBTTagCompound
. The tag compound will be equal to the
one returned by writeToNbt(IGuiSlot)
public abstract net.minecraft.nbt.NBTTagCompound writeToNbt(S slot)
public abstract S readFromBuffer(PacketBufferBC buffer) throws java.io.IOException
StatementWrapper
from the given PacketBufferBC
. The buffer will return the data written
to a different buffer by writeToBuffer(PacketBufferBC, IGuiSlot)
.java.io.IOException
public abstract void writeToBuffer(PacketBufferBC buffer, S slot)
@Nullable public abstract S convertToType(java.lang.Object value)