Class ChestMountedStorage
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.api.contraption.storage.item.chest.ChestMountedStorage
- All Implemented Interfaces:
net.neoforged.neoforge.items.IItemHandler,net.neoforged.neoforge.items.IItemHandlerModifiable
Mounted storage that handles opening a combined GUI for double chests.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<ChestMountedStorage> 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
ConstructorsModifierConstructorDescriptionprotectedChestMountedStorage(MountedItemStorageType<?> type, net.neoforged.neoforge.items.IItemHandler handler) ChestMountedStorage(net.neoforged.neoforge.items.IItemHandler handler) -
Method Summary
Modifier and TypeMethodDescriptionprotected net.neoforged.neoforge.items.IItemHandlerModifiablegetHandlerForMenu(net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo info, Contraption contraption) Get the item handler that will be used by this storage's menu.protected @Nullable MountedItemStoragegetOtherHalf(Contraption contraption, net.minecraft.core.BlockPos localPos, net.minecraft.world.level.block.Block block, net.minecraft.core.Direction thisFacing, net.minecraft.world.level.block.state.properties.ChestType thisType) protected voidplayClosingSound(net.minecraft.server.level.ServerLevel level, net.minecraft.world.phys.Vec3 pos) Play the sound made by closing this storage's GUI.protected voidplayOpeningSound(net.minecraft.server.level.ServerLevel level, net.minecraft.world.phys.Vec3 pos) Play the sound made by opening this storage's GUI.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.simple.SimpleMountedStorage
codec, validateMethods 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, getMenuName, handleInteraction, isMenuValid
-
Field Details
-
CODEC
-
-
Constructor Details
-
ChestMountedStorage
protected ChestMountedStorage(MountedItemStorageType<?> type, net.neoforged.neoforge.items.IItemHandler handler) -
ChestMountedStorage
public ChestMountedStorage(net.neoforged.neoforge.items.IItemHandler handler)
-
-
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.- Overrides:
unmountin classSimpleMountedStorage
-
getHandlerForMenu
protected net.neoforged.neoforge.items.IItemHandlerModifiable getHandlerForMenu(net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo info, Contraption contraption) Description copied from class:MountedItemStorageGet the item handler that will be used by this storage's menu. This is useful for handling multi-blocks, such as double chests.- Overrides:
getHandlerForMenuin classMountedItemStorage
-
getOtherHalf
@Nullable protected @Nullable MountedItemStorage getOtherHalf(Contraption contraption, net.minecraft.core.BlockPos localPos, net.minecraft.world.level.block.Block block, net.minecraft.core.Direction thisFacing, net.minecraft.world.level.block.state.properties.ChestType thisType) -
playOpeningSound
protected void playOpeningSound(net.minecraft.server.level.ServerLevel level, net.minecraft.world.phys.Vec3 pos) Description copied from class:MountedItemStoragePlay the sound made by opening this storage's GUI.- Overrides:
playOpeningSoundin classMountedItemStorage
-
playClosingSound
protected void playClosingSound(net.minecraft.server.level.ServerLevel level, net.minecraft.world.phys.Vec3 pos) Description copied from class:MountedItemStoragePlay the sound made by closing this storage's GUI.- Overrides:
playClosingSoundin classMountedItemStorage
-