Class FallbackMountedStorage
java.lang.Object
com.simibubi.create.api.contraption.storage.item.MountedItemStorage
com.simibubi.create.api.contraption.storage.item.WrapperMountedItemStorage<net.neoforged.neoforge.items.ItemStackHandler>
com.simibubi.create.api.contraption.storage.item.simple.SimpleMountedStorage
com.simibubi.create.impl.contraption.storage.FallbackMountedStorage
- All Implemented Interfaces:
net.neoforged.neoforge.items.IItemHandler,net.neoforged.neoforge.items.IItemHandlerModifiable
A fallback mounted storage impl that will try to be used when no type is
registered for a block. This requires that the mounted block provide an item handler
whose class is exactly
ItemStackHandler.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<FallbackMountedStorage> Fields inherited from class com.simibubi.create.api.contraption.storage.item.WrapperMountedItemStorage
wrappedFields inherited from class com.simibubi.create.api.contraption.storage.item.MountedItemStorage
STREAM_CODEC, type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisValid(net.neoforged.neoforge.items.IItemHandler handler) protected Optional<net.neoforged.neoforge.items.IItemHandlerModifiable> validate(net.neoforged.neoforge.items.IItemHandler handler) Make sure the targeted handler is valid for copying items back into.Methods inherited from class com.simibubi.create.api.contraption.storage.item.simple.SimpleMountedStorage
codec, unmountMethods inherited from class com.simibubi.create.api.contraption.storage.item.WrapperMountedItemStorage
copyToItemStackHandler, extractItem, getSlotLimit, getSlots, getStackInSlot, insertItem, isItemValid, setStackInSlotMethods inherited from class com.simibubi.create.api.contraption.storage.item.MountedItemStorage
createMenuProvider, getHandlerForMenu, getMenuName, handleInteraction, isMenuValid, playClosingSound, playOpeningSound
-
Field Details
-
CODEC
-
-
Constructor Details
-
FallbackMountedStorage
public FallbackMountedStorage(net.neoforged.neoforge.items.IItemHandler handler)
-
-
Method Details
-
validate
protected Optional<net.neoforged.neoforge.items.IItemHandlerModifiable> validate(net.neoforged.neoforge.items.IItemHandler handler) Description copied from class:SimpleMountedStorageMake sure the targeted handler is valid for copying items back into. It is highly recommended to call super in overrides.- Overrides:
validatein classSimpleMountedStorage
-
isValid
public static boolean isValid(net.neoforged.neoforge.items.IItemHandler handler)
-