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
public class IItemHandlerBitInventory
extends mod.chiselsandbits.inventory.bit.AbstractBitInventory
-
Constructor Summary
ConstructorsConstructorDescriptionIItemHandlerBitInventory(net.neoforged.neoforge.transfer.ResourceHandler<net.neoforged.neoforge.transfer.item.ItemResource> 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 voidsetItem(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, contains, extract, getContainedStates, getMaxBitsFor, getMaxExtractAmount, getMaxInsertAmount, insertMethods inherited from class 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.transfer.ResourceHandler<net.neoforged.neoforge.transfer.item.ItemResource> 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.
-
setItem
protected void setItem(int index, net.minecraft.world.item.ItemStack stack) Sets the slot with the given index with the given stack.- Specified by:
setItemin classmod.chiselsandbits.inventory.bit.AbstractBitInventory- Parameters:
index- The index of the slot.stack- The stack to insert.
-
isEmpty
public boolean isEmpty()
-