Class VanillaItemBundleItemHandler
java.lang.Object
org.cyclops.commoncapabilities.capability.itemhandler.ItemItemHandler
org.cyclops.commoncapabilities.modcompat.vanilla.capability.itemhandler.VanillaItemBundleItemHandler
- All Implemented Interfaces:
net.neoforged.neoforge.items.IItemHandler
,net.neoforged.neoforge.items.IItemHandlerModifiable
An item handler wrapper for the bundle.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected net.minecraft.core.NonNullList
<net.minecraft.world.item.ItemStack> int
getSlotLimit
(int slot) int
getSlots()
@NotNull net.minecraft.world.item.ItemStack
insertItem
(int slot, @NotNull net.minecraft.world.item.ItemStack stack, boolean simulate) boolean
isItemValid
(int slot, net.minecraft.world.item.ItemStack stack) protected void
setItemList
(net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> itemStacks) void
setStackInSlot
(int slot, net.minecraft.world.item.ItemStack stack) Methods inherited from class org.cyclops.commoncapabilities.capability.itemhandler.ItemItemHandler
extractItem, getItemStack, getStackInSlot
-
Constructor Details
-
VanillaItemBundleItemHandler
public VanillaItemBundleItemHandler(net.minecraft.world.item.ItemStack itemStack)
-
-
Method Details
-
getItemList
protected net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getItemList()- Specified by:
getItemList
in classItemItemHandler
-
setItemList
protected void setItemList(net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> itemStacks) - Specified by:
setItemList
in classItemItemHandler
-
getSlots
public int getSlots() -
getSlotLimit
public int getSlotLimit(int slot) -
isItemValid
public boolean isItemValid(int slot, @Nonnull net.minecraft.world.item.ItemStack stack) -
setStackInSlot
public void setStackInSlot(int slot, net.minecraft.world.item.ItemStack stack) - Specified by:
setStackInSlot
in interfacenet.neoforged.neoforge.items.IItemHandlerModifiable
- Overrides:
setStackInSlot
in classItemItemHandler
-
insertItem
@NotNull public @NotNull net.minecraft.world.item.ItemStack insertItem(int slot, @NotNull @NotNull net.minecraft.world.item.ItemStack stack, boolean simulate) - Specified by:
insertItem
in interfacenet.neoforged.neoforge.items.IItemHandler
- Overrides:
insertItem
in classItemItemHandler
-