Class ItemVaultMountedStorage
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.content.logistics.vault.ItemVaultMountedStorage
- All Implemented Interfaces:
net.neoforged.neoforge.items.IItemHandler,net.neoforged.neoforge.items.IItemHandlerModifiable
public class ItemVaultMountedStorage
extends WrapperMountedItemStorage<net.neoforged.neoforge.items.ItemStackHandler>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<ItemVaultMountedStorage> 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
ConstructorsModifierConstructorDescriptionprotectedItemVaultMountedStorage(MountedItemStorageType<?> type, net.neoforged.neoforge.items.ItemStackHandler handler) protectedItemVaultMountedStorage(net.neoforged.neoforge.items.ItemStackHandler handler) -
Method Summary
Modifier and TypeMethodDescriptionstatic ItemVaultMountedStoragefromLegacy(net.minecraft.core.HolderLookup.Provider registries, net.minecraft.nbt.CompoundTag nbt) static ItemVaultMountedStoragefromVault(ItemVaultBlockEntity vault) 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
-
ItemVaultMountedStorage
protected ItemVaultMountedStorage(MountedItemStorageType<?> type, net.neoforged.neoforge.items.ItemStackHandler handler) -
ItemVaultMountedStorage
protected ItemVaultMountedStorage(net.neoforged.neoforge.items.ItemStackHandler 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.- 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
-
fromVault
-
fromLegacy
public static ItemVaultMountedStorage fromLegacy(net.minecraft.core.HolderLookup.Provider registries, net.minecraft.nbt.CompoundTag nbt)
-