Class MountedStorageManager

java.lang.Object
com.simibubi.create.content.contraptions.MountedStorageManager
Direct Known Subclasses:
TrainCargoManager

public class MountedStorageManager extends Object
  • Field Details

  • Constructor Details

    • MountedStorageManager

      public MountedStorageManager()
  • Method Details

    • initialize

      public void initialize()
    • reset

      protected void reset()
    • addBlock

      public void addBlock(net.minecraft.world.level.Level level, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos globalPos, net.minecraft.core.BlockPos localPos, @Nullable @Nullable net.minecraft.world.level.block.entity.BlockEntity be)
    • unmount

      public void unmount(net.minecraft.world.level.Level level, net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo info, net.minecraft.core.BlockPos globalPos, @Nullable @Nullable net.minecraft.world.level.block.entity.BlockEntity be)
    • tick

      public void tick(AbstractContraptionEntity entity)
    • handleSync

      public void handleSync(MountedStorageSyncPacket packet, AbstractContraptionEntity entity)
    • read

      public void read(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket, @Nullable @Nullable Contraption contraption)
    • write

      public void write(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket)
    • attachExternal

      public void attachExternal(net.neoforged.neoforge.items.IItemHandlerModifiable externalStorage)
    • getAllItems

      public net.neoforged.neoforge.items.wrapper.CombinedInvWrapper getAllItems()
      The primary way to access a contraption's inventory. Includes all non-internal mounted storages as well as all external storage.
    • getAllItemStorages

      public com.google.common.collect.ImmutableMap<net.minecraft.core.BlockPos,MountedItemStorage> getAllItemStorages()
      Gets a map of all MountedItemStorages in the contraption, irrelevant of them being internal or providing fuel.
    • getMountedItems

      public MountedItemStorageWrapper getMountedItems()
      Gets an item handler wrapping all non-internal mounted storages. This is not the whole contraption inventory as it does not include external storages. Most often, you want getAllItems(), which does.
    • getFuelItems

      @Nullable public @Nullable MountedItemStorageWrapper getFuelItems()
      Gets an item handler wrapping all non-internal mounted storages that provide fuel. May be null if none are present.
    • getFluids

      public MountedFluidStorageWrapper getFluids()
      Gets a fluid handler wrapping all mounted fluid storages.
    • handlePlayerStorageInteraction

      public boolean handlePlayerStorageInteraction(Contraption contraption, net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos localPos)