Class IItemHandlerBitInventory
java.lang.Object
mod.chiselsandbits.inventory.bit.AbstractBitInventory
mod.chiselsandbits.forge.inventory.bit.IItemHandlerBitInventory
- All Implemented Interfaces:
mod.chiselsandbits.api.inventory.bit.IBitInventory
- Direct Known Subclasses:
IModifiableItemHandlerBitInventory
public class IItemHandlerBitInventory
extends mod.chiselsandbits.inventory.bit.AbstractBitInventory
-
Constructor Summary
ConstructorsConstructorDescriptionIItemHandlerBitInventory(net.neoforged.neoforge.items.IItemHandler itemHandler) -
Method Summary
Modifier and TypeMethodDescriptionprotected intThe size of the inventory.protected net.minecraft.world.item.ItemStackgetItem(int index) Gets a copy of the stack that is in the given slot.booleanisEmpty()protected voidsetSlotContents(int index, net.minecraft.world.item.ItemStack stack) Sets the slot with the given index with the given stack.Methods inherited from class mod.chiselsandbits.inventory.bit.AbstractBitInventory
canExtract, canInsert, extract, getContainedStates, getMaxBitsForSlot, getMaxExtractAmount, getMaxInsertAmount, insertMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface mod.chiselsandbits.api.inventory.bit.IBitInventory
canExtractOne, canInsertOne, extractOne, insert, insertOne, insertOrDiscard
-
Constructor Details
-
IItemHandlerBitInventory
public IItemHandlerBitInventory(net.neoforged.neoforge.items.IItemHandler itemHandler)
-
-
Method Details
-
getItem
protected net.minecraft.world.item.ItemStack getItem(int index) Gets a copy of the stack that is in the given slot.- Specified by:
getItemin classmod.chiselsandbits.inventory.bit.AbstractBitInventory- Parameters:
index- The index of the slot to read.- Returns:
- A copy of the stack in the slot.
-
getInventorySize
protected int getInventorySize()The size of the inventory.- Specified by:
getInventorySizein classmod.chiselsandbits.inventory.bit.AbstractBitInventory- Returns:
- The size of the inventory.
-
setSlotContents
protected void setSlotContents(int index, net.minecraft.world.item.ItemStack stack) Sets the slot with the given index with the given stack.- Specified by:
setSlotContentsin classmod.chiselsandbits.inventory.bit.AbstractBitInventory- Parameters:
index- The index of the slot.stack- The stack to insert.
-
isEmpty
public boolean isEmpty()
-