Class ToolboxMountedStorage
java.lang.Object
com.simibubi.create.api.contraption.storage.item.MountedItemStorage
com.simibubi.create.api.contraption.storage.item.WrapperMountedItemStorage<ToolboxInventory>
com.simibubi.create.content.equipment.toolbox.ToolboxMountedStorage
- All Implemented Interfaces:
net.neoforged.neoforge.items.IItemHandler,net.neoforged.neoforge.items.IItemHandlerModifiable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<ToolboxMountedStorage> 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
ConstructorsModifierConstructorDescriptionprotectedToolboxMountedStorage(MountedItemStorageType<?> type, ToolboxInventory wrapped) protectedToolboxMountedStorage(ToolboxInventory wrapped) -
Method Summary
Modifier and TypeMethodDescriptionstatic ToolboxMountedStoragefromLegacy(net.minecraft.core.HolderLookup.Provider registries, net.minecraft.nbt.CompoundTag nbt) static ToolboxMountedStoragefromToolbox(ToolboxBlockEntity toolbox) booleanhandleInteraction(net.minecraft.server.level.ServerPlayer player, Contraption contraption, net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo info) Handle a player clicking on this mounted storage.voidunmount(net.minecraft.world.level.Level level, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, @Nullable net.minecraft.world.level.block.entity.BlockEntity be) Un-mount this storage back into the world.Methods 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, isMenuValid, playClosingSound, playOpeningSound
-
Field Details
-
CODEC
-
-
Constructor Details
-
ToolboxMountedStorage
-
ToolboxMountedStorage
-
-
Method Details
-
unmount
public void unmount(net.minecraft.world.level.Level level, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, @Nullable @Nullable net.minecraft.world.level.block.entity.BlockEntity be) Description copied from class:MountedItemStorageUn-mount this storage back into the world. The expected storage type of the target block has already been checked to make sure it matches this storage's type.- Specified by:
unmountin classMountedItemStorage
-
handleInteraction
public boolean handleInteraction(net.minecraft.server.level.ServerPlayer player, Contraption contraption, net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo info) Description copied from class:MountedItemStorageHandle a player clicking on this mounted storage. This is always called on the server. The default implementation will try to open a generic GUI for standard inventories. For this to work, this storage must have 1-6 complete rows of 9 slots.- Overrides:
handleInteractionin classMountedItemStorage- Returns:
- true if the interaction was successful
-
fromToolbox
-
fromLegacy
public static ToolboxMountedStorage fromLegacy(net.minecraft.core.HolderLookup.Provider registries, net.minecraft.nbt.CompoundTag nbt)
-