Class GhostMultiblockControllerBE

java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
com.portingdeadmods.portingdeadlibs.api.blockentities.ContainerBlockEntity
com.portingdeadmods.portingdeadlibs.api.ghost.GhostMultiblockControllerBE
All Implemented Interfaces:
net.minecraft.world.inventory.MenuConstructor, net.minecraft.world.MenuProvider, net.neoforged.neoforge.attachment.IAttachmentHolder, net.neoforged.neoforge.client.extensions.IMenuProviderExtension, net.neoforged.neoforge.common.extensions.IBlockEntityExtension

public abstract class GhostMultiblockControllerBE extends ContainerBlockEntity implements net.minecraft.world.MenuProvider
  • Field Details

    • partPos

      public final LazyFinal<List<net.minecraft.core.BlockPos>> partPos
    • itemHandlerPartPos

      public final LazyFinal<List<net.minecraft.core.BlockPos>> itemHandlerPartPos
    • fluidHandlerPartPos

      public final LazyFinal<List<net.minecraft.core.BlockPos>> fluidHandlerPartPos
    • energyHandlerPartPos

      public final LazyFinal<List<net.minecraft.core.BlockPos>> energyHandlerPartPos
  • Constructor Details

    • GhostMultiblockControllerBE

      public GhostMultiblockControllerBE(net.minecraft.world.level.block.entity.BlockEntityType<?> blockEntityType, net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState)
  • Method Details

    • setPartPositions

      public void setPartPositions(List<net.minecraft.core.BlockPos> partPositions)
    • setItemHandlerPartPos

      public void setItemHandlerPartPos(List<net.minecraft.core.BlockPos> itemHandlerPartPos)
    • setFluidHandlerPartPos

      public void setFluidHandlerPartPos(List<net.minecraft.core.BlockPos> fluidHandlerPartPos)
    • setEnergyHandlerPartPos

      public void setEnergyHandlerPartPos(List<net.minecraft.core.BlockPos> energyHandlerPartPos)
    • setPartPositions

      public void setPartPositions(List<net.minecraft.core.BlockPos> partPositions, List<net.minecraft.core.BlockPos> itemHandlerPartPos, List<net.minecraft.core.BlockPos> fluidHandlerPartPos, List<net.minecraft.core.BlockPos> energyHandlerPartPos)
    • saveData

      protected void saveData(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries)
      Overrides:
      saveData in class ContainerBlockEntity
    • loadData

      protected void loadData(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries)
      Overrides:
      loadData in class ContainerBlockEntity
    • shouldExposeCapability

      public <T> boolean shouldExposeCapability(net.neoforged.neoforge.capabilities.BlockCapability<T,@Nullable net.minecraft.core.Direction> capability, net.minecraft.core.BlockPos partPos)
      Override this method to control which capabilities are exposed by which parts.
      Parameters:
      capability - The capability being requested.
      partPos - The position of the part requesting the capability.
      Returns:
      True if the capability should be exposed, false otherwise.
    • getDisplayName

      public abstract net.minecraft.network.chat.Component getDisplayName()
      Specified by:
      getDisplayName in interface net.minecraft.world.MenuProvider
    • createMenu

      @Nullable public abstract @Nullable net.minecraft.world.inventory.AbstractContainerMenu createMenu(int containerId, net.minecraft.world.entity.player.Inventory inventory, net.minecraft.world.entity.player.Player player)
      Specified by:
      createMenu in interface net.minecraft.world.inventory.MenuConstructor