Class ToolboxMountedStorage

All Implemented Interfaces:
net.neoforged.neoforge.items.IItemHandler, net.neoforged.neoforge.items.IItemHandlerModifiable

public class ToolboxMountedStorage extends WrapperMountedItemStorage<ToolboxInventory>
  • Field Details

  • Constructor Details

  • 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: MountedItemStorage
      Un-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:
      unmount in class MountedItemStorage
    • 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: MountedItemStorage
      Handle 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:
      handleInteraction in class MountedItemStorage
      Returns:
      true if the interaction was successful
    • fromToolbox

      public static ToolboxMountedStorage fromToolbox(ToolboxBlockEntity toolbox)
    • fromLegacy

      public static ToolboxMountedStorage fromLegacy(net.minecraft.core.HolderLookup.Provider registries, net.minecraft.nbt.CompoundTag nbt)