Class GhostMultiblockControllerBE

java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
All Implemented Interfaces:
ResourceHandlerBlockEntity, net.minecraft.core.TypedInstance<net.minecraft.world.level.block.entity.BlockEntityType<?>>, net.minecraft.util.debug.DebugValueSource, net.minecraft.world.inventory.MenuConstructor, net.minecraft.world.MenuProvider, net.neoforged.neoforge.attachment.IAttachmentHolder, net.neoforged.neoforge.common.extensions.IBlockEntityExtension, net.neoforged.neoforge.common.extensions.IMenuProviderExtension

public abstract class GhostMultiblockControllerBE extends SimpleContainerBlockEntity implements net.minecraft.world.MenuProvider
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder

    net.neoforged.neoforge.attachment.AttachmentHolder.AsField

    Nested classes/interfaces inherited from interface net.minecraft.util.debug.DebugValueSource

    net.minecraft.util.debug.DebugValueSource.Registration, net.minecraft.util.debug.DebugValueSource.ValueGetter<T>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final Map<net.minecraft.core.BlockPos, List<net.minecraft.resources.Identifier>>
     
    final Map<net.minecraft.core.BlockPos, GhostPartMenuFactory>
     
    final Set<net.minecraft.core.BlockPos>
     

    Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity

    level, remove, worldPosition

    Fields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder

    ATTACHMENTS_NBT_KEY
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    protected abstract PDLAbstractContainerMenu<?>
    createControllerMenu(int containerId, net.minecraft.world.entity.player.Inventory inventory, net.minecraft.world.entity.player.Player player)
     
    final @Nullable net.minecraft.world.inventory.AbstractContainerMenu
    createMenu(int containerId, net.minecraft.world.entity.player.Inventory inventory, net.minecraft.world.entity.player.Player player)
     
    boolean
    exposesHandler(net.minecraft.resources.Identifier handlerKey, net.minecraft.core.BlockPos partPos)
     
    <T> boolean
    exposesHandler(net.neoforged.neoforge.capabilities.BlockCapability<T, @Nullable net.minecraft.core.Direction> handler, net.minecraft.core.BlockPos partPos)
     
    abstract net.minecraft.network.chat.Component
     
    Map<net.minecraft.core.BlockPos, List<net.minecraft.resources.Identifier>>
     
    Set<net.minecraft.core.BlockPos>
     
    protected void
    loadAdditional(net.minecraft.world.level.storage.ValueInput input)
     
    void
    prepareMenu(@Nullable net.minecraft.core.BlockPos partPos)
     
    protected void
    saveAdditional(net.minecraft.world.level.storage.ValueOutput output)
     
    void
    setPartConfiguration(Set<net.minecraft.core.BlockPos> partPositions, Map<net.minecraft.core.BlockPos, List<net.minecraft.resources.Identifier>> handlerExposure, Map<net.minecraft.core.BlockPos, GhostPartMenuFactory> menuFactories)
     

    Methods inherited from class SimpleContainerBlockEntity

    getHandlerHolder

    Methods inherited from class PDLBlockEntity

    dropItems, preRemoveSideEffects, tick

    Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity

    addEntityType, applyComponents, applyComponentsFromItemStack, applyImplicitComponents, clearRemoved, collectComponents, collectImplicitComponents, components, fillCrashReportCategory, getAndClearAttachmentTypesToSync, getBlockPos, getBlockState, getLevel, getNameForReporting, getPersistentData, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, parseCustomNameSafe, problemPath, registerDebugValues, removeComponentsFromTag, removeData, saveCustomOnly, saveCustomOnly, saveWithFullMetadata, saveWithFullMetadata, saveWithId, saveWithoutMetadata, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved, syncData, triggerEvent, typeHolder

    Methods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder

    deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, serializeAttachments

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder

    getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData, syncData

    Methods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension

    getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate

    Methods inherited from interface net.neoforged.neoforge.common.extensions.IMenuProviderExtension

    shouldTriggerClientSideContainerClosingOnOpen, writeClientSideData

    Methods inherited from interface net.minecraft.core.TypedInstance

    is, is, is, is, is, tags
  • Field Details

    • partPositions

      public final Set<net.minecraft.core.BlockPos> partPositions
    • exposedHandlers

      public final Map<net.minecraft.core.BlockPos, List<net.minecraft.resources.Identifier>> exposedHandlers
    • partMenus

      public final Map<net.minecraft.core.BlockPos, GhostPartMenuFactory> partMenus
  • 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

    • setPartConfiguration

      public void setPartConfiguration(Set<net.minecraft.core.BlockPos> partPositions, Map<net.minecraft.core.BlockPos, List<net.minecraft.resources.Identifier>> handlerExposure, Map<net.minecraft.core.BlockPos, GhostPartMenuFactory> menuFactories)
    • getPartPositions

      public Set<net.minecraft.core.BlockPos> getPartPositions()
    • getExposedHandlers

      public Map<net.minecraft.core.BlockPos, List<net.minecraft.resources.Identifier>> getExposedHandlers()
    • exposesHandler

      public boolean exposesHandler(net.minecraft.resources.Identifier handlerKey, net.minecraft.core.BlockPos partPos)
    • exposesHandler

      public <T> boolean exposesHandler(net.neoforged.neoforge.capabilities.BlockCapability<T, @Nullable net.minecraft.core.Direction> handler, net.minecraft.core.BlockPos partPos)
    • prepareMenu

      public void prepareMenu(@Nullable @Nullable net.minecraft.core.BlockPos partPos)
    • saveAdditional

      protected void saveAdditional(net.minecraft.world.level.storage.ValueOutput output)
      Overrides:
      saveAdditional in class SimpleContainerBlockEntity
    • loadAdditional

      protected void loadAdditional(net.minecraft.world.level.storage.ValueInput input)
      Overrides:
      loadAdditional in class SimpleContainerBlockEntity
    • getDisplayName

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

      @Nullable public final @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
    • createControllerMenu

      protected abstract PDLAbstractContainerMenu<?> createControllerMenu(int containerId, net.minecraft.world.entity.player.Inventory inventory, net.minecraft.world.entity.player.Player player)