public interface IStorageChannel<T extends IAEStack<T>>
| Modifier and Type | Method and Description |
|---|---|
T |
createFromNBT(net.minecraft.nbt.NBTTagCompound nbt)
create from nbt data
|
IItemList<T> |
createList()
Create a new
IItemList of the specific type. |
T |
createStack(java.lang.Object input)
Create a new
IAEStack subtype of the specific object. |
default int |
getUnitsPerByte()
The number of units (eg item count, or millibuckets) that can be stored per byte in a storage cell.
|
T |
readFromPacket(io.netty.buffer.ByteBuf input) |
default int |
transferFactor()
Can be used as factor for transferring stacks of a channel.
|
default int transferFactor()
default int getUnitsPerByte()
@Nullable T createStack(@Nonnull java.lang.Object input)
IAEStack subtype of the specific object.
The parameter is unbound to allow a slightly more flexible approach.
But the general intention is about converting an ItemStack or FluidStack into the corresponding
IAEStack.
Another valid case might be to use it instead of IAEStack.copy(), but this might not be supported by all
types.
IAEStacks that use custom items for IAEStack.asItemStackRepresentation() must also be able to convert
these.input - The object to turn into an IAEStack@Nullable T readFromPacket(@Nonnull io.netty.buffer.ByteBuf input) throws java.io.IOException
input - java.io.IOException@Nullable T createFromNBT(@Nonnull net.minecraft.nbt.NBTTagCompound nbt)
nbt -