Class WrapperMountedItemStorage<T extends net.neoforged.neoforge.items.IItemHandlerModifiable>
java.lang.Object
com.simibubi.create.api.contraption.storage.item.MountedItemStorage
com.simibubi.create.api.contraption.storage.item.WrapperMountedItemStorage<T>
- All Implemented Interfaces:
net.neoforged.neoforge.items.IItemHandler,net.neoforged.neoforge.items.IItemHandlerModifiable
- Direct Known Subclasses:
DepotMountedStorage,ItemVaultMountedStorage,SimpleMountedStorage,ToolboxMountedStorage
public abstract class WrapperMountedItemStorage<T extends net.neoforged.neoforge.items.IItemHandlerModifiable>
extends MountedItemStorage
Partial implementation of a MountedItemStorage that wraps an item handler.
-
Field Summary
FieldsFields inherited from class com.simibubi.create.api.contraption.storage.item.MountedItemStorage
CODEC, STREAM_CODEC, type -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedWrapperMountedItemStorage(MountedItemStorageType<?> type, T wrapped) -
Method Summary
Modifier and TypeMethodDescriptionstatic net.neoforged.neoforge.items.ItemStackHandlercopyToItemStackHandler(net.neoforged.neoforge.items.IItemHandler handler) @NotNull net.minecraft.world.item.ItemStackextractItem(int slot, int amount, boolean simulate) intgetSlotLimit(int slot) intgetSlots()@NotNull net.minecraft.world.item.ItemStackgetStackInSlot(int slot) @NotNull net.minecraft.world.item.ItemStackinsertItem(int slot, @NotNull net.minecraft.world.item.ItemStack stack, boolean simulate) booleanisItemValid(int slot, @NotNull net.minecraft.world.item.ItemStack stack) voidsetStackInSlot(int slot, @NotNull net.minecraft.world.item.ItemStack stack) Methods inherited from class com.simibubi.create.api.contraption.storage.item.MountedItemStorage
createMenuProvider, getHandlerForMenu, getMenuName, handleInteraction, isMenuValid, playClosingSound, playOpeningSound, unmount
-
Field Details
-
wrapped
-
-
Constructor Details
-
WrapperMountedItemStorage
-
-
Method Details
-
setStackInSlot
public void setStackInSlot(int slot, @NotNull @NotNull net.minecraft.world.item.ItemStack stack) -
getSlots
public int getSlots() -
getStackInSlot
@NotNull public @NotNull net.minecraft.world.item.ItemStack getStackInSlot(int slot) -
insertItem
@NotNull public @NotNull net.minecraft.world.item.ItemStack insertItem(int slot, @NotNull @NotNull net.minecraft.world.item.ItemStack stack, boolean simulate) -
extractItem
@NotNull public @NotNull net.minecraft.world.item.ItemStack extractItem(int slot, int amount, boolean simulate) -
getSlotLimit
public int getSlotLimit(int slot) -
isItemValid
public boolean isItemValid(int slot, @NotNull @NotNull net.minecraft.world.item.ItemStack stack) -
copyToItemStackHandler
public static net.neoforged.neoforge.items.ItemStackHandler copyToItemStackHandler(net.neoforged.neoforge.items.IItemHandler handler)
-