public interface ICellHandler
ICellRegistry
Modifier and Type | Method and Description |
---|---|
double |
cellIdleDrain(net.minecraft.item.ItemStack is,
IMEInventory handler) |
IMEInventoryHandler |
getCellInventory(net.minecraft.item.ItemStack is,
ISaveProvider host,
StorageChannel channel)
If you cannot handle the provided item, return null
|
int |
getStatusForCell(net.minecraft.item.ItemStack is,
IMEInventory handler)
0 - cell is missing.
|
net.minecraft.util.IIcon |
getTopTexture_Dark() |
net.minecraft.util.IIcon |
getTopTexture_Light() |
net.minecraft.util.IIcon |
getTopTexture_Medium() |
boolean |
isCell(net.minecraft.item.ItemStack is)
return true if the provided item is handled by your cell handler.
|
void |
openChestGui(net.minecraft.entity.player.EntityPlayer player,
IChestOrDrive chest,
ICellHandler cellHandler,
IMEInventoryHandler inv,
net.minecraft.item.ItemStack is,
StorageChannel chan)
Called when the storage cell is planed in an ME Chest and the user tries to open the terminal side, if your item
is not available via ME Chests simply tell the user they can't use it, or something, other wise you should open
your gui and display the cell to the user.
|
boolean isCell(net.minecraft.item.ItemStack is)
is
- to be checked itemIMEInventoryHandler getCellInventory(net.minecraft.item.ItemStack is, ISaveProvider host, StorageChannel channel)
is
- a storage cell item.host
- anytime the contents of your storage cell changes it should use this to request a save, please
note, this value can be null.channel
- the storage channel requested.net.minecraft.util.IIcon getTopTexture_Light()
net.minecraft.util.IIcon getTopTexture_Medium()
net.minecraft.util.IIcon getTopTexture_Dark()
void openChestGui(net.minecraft.entity.player.EntityPlayer player, IChestOrDrive chest, ICellHandler cellHandler, IMEInventoryHandler inv, net.minecraft.item.ItemStack is, StorageChannel chan)
player
- player opening chest guichest
- to be opened chestcellHandler
- cell handlerinv
- inventory handleris
- itemchan
- storage channelint getStatusForCell(net.minecraft.item.ItemStack is, IMEInventory handler)
1 - green, ( usually means available room for types or items. )
2 - orange, ( usually means available room for items, but not types. )
3 - red, ( usually means the cell is 100% full )
is
- the cell item. ( use the handler for any details you can )handler
- the handler for the cell is provides for reference, you can cast this to your handler.double cellIdleDrain(net.minecraft.item.ItemStack is, IMEInventory handler)