Class MachineAdvancedAssemblerBlockEntity

java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.level.block.entity.BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
com.hbm_m.block.entity.BaseMachineBlockEntity
com.hbm_m.block.entity.machines.MachineAdvancedAssemblerBlockEntity
All Implemented Interfaces:
IEnergyConnector, IEnergyProvider, IEnergyReceiver, IFrameSupportable, IMultiblockSidedIO, net.minecraft.world.inventory.MenuConstructor, net.minecraft.world.MenuProvider, net.minecraftforge.common.capabilities.ICapabilityProvider, net.minecraftforge.common.capabilities.ICapabilityProviderImpl<net.minecraft.world.level.block.entity.BlockEntity>, net.minecraftforge.common.capabilities.ICapabilitySerializable<net.minecraft.nbt.CompoundTag>, net.minecraftforge.common.extensions.IForgeBlockEntity, net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>

public class MachineAdvancedAssemblerBlockEntity extends BaseMachineBlockEntity implements IFrameSupportable, IMultiblockSidedIO
Advanced Assembler Block Entity: - Наследование от BaseMachineBlockEntity - Полная логика мультиблока, GUI, анимации и рецептов перенесена из старой системы - Энергосистема остается long-ориентированной с совместимостью Forge Energy
  • Field Details

    • fluidInputHandler

      protected net.minecraftforge.common.util.LazyOptional<net.minecraftforge.fluids.capability.IFluidHandler> fluidInputHandler
    • fluidOutputHandler

      protected net.minecraftforge.common.util.LazyOptional<net.minecraftforge.fluids.capability.IFluidHandler> fluidOutputHandler
    • lastUseTick

      public long lastUseTick
    • data

      protected final net.minecraft.world.inventory.ContainerData data
  • Constructor Details

    • MachineAdvancedAssemblerBlockEntity

      public MachineAdvancedAssemblerBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
  • Method Details

    • isCrafting

      public boolean isCrafting()
    • isClientCrafting

      public boolean isClientCrafting()
    • getDefaultName

      protected net.minecraft.network.chat.Component getDefaultName()
      Specified by:
      getDefaultName in class BaseMachineBlockEntity
    • getDisplayName

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

      protected void setupFluidCapability()
      Overrides:
      setupFluidCapability in class BaseMachineBlockEntity
    • isItemValidForSlot

      protected boolean isItemValidForSlot(int slot, net.minecraft.world.item.ItemStack stack)
      Specified by:
      isItemValidForSlot in class BaseMachineBlockEntity
    • getRenderBoundingBox

      public net.minecraft.world.phys.AABB getRenderBoundingBox()
      Description copied from class: BaseMachineBlockEntity
      Рендер-баундинг бокс по умолчанию. На Forge это @Override метода из BlockEntity, на Fabric — обычный public метод. Подклассы могут переопределить для мультиблоков с увеличенным размером.
      Specified by:
      getRenderBoundingBox in interface net.minecraftforge.common.extensions.IForgeBlockEntity
      Overrides:
      getRenderBoundingBox in class BaseMachineBlockEntity
    • createMenu

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

      public void checkForFrame()
      Description copied from interface: IFrameSupportable
      Запускает проверку, должна ли структура в данный момент отображать рамку. Реализация этого метода должна вызывать централизованную логику проверки и затем использовать setFrameVisible() для применения результата.
      Specified by:
      checkForFrame in interface IFrameSupportable
    • setFrameVisible

      public boolean setFrameVisible(boolean visible)
      Description copied from interface: IFrameSupportable
      Устанавливает новое состояние видимости рамки и синхронизирует его с клиентом.
      Specified by:
      setFrameVisible in interface IFrameSupportable
      Parameters:
      visible - Новое состояние видимости.
      Returns:
      true, если состояние было изменено, иначе false.
    • isFrameVisible

      public boolean isFrameVisible()
      Specified by:
      isFrameVisible in interface IFrameSupportable
      Returns:
      Текущее клиентское состояние видимости рамки. Используется рендерером.
    • tick

      public static void tick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, MachineAdvancedAssemblerBlockEntity entity)
    • getAvailableRecipes

      public List<AssemblerRecipe> getAvailableRecipes()
    • setSelectedRecipe

      public void setSelectedRecipe(net.minecraft.resources.ResourceLocation recipeId)
    • getSelectedRecipe

      @Nullable public AssemblerRecipe getSelectedRecipe()
    • getSelectedRecipeId

      public net.minecraft.resources.ResourceLocation getSelectedRecipeId()
    • getGhostItems

      public net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getGhostItems()
      Overrides:
      getGhostItems in class BaseMachineBlockEntity
    • getBlueprintFolder

      public net.minecraft.world.item.ItemStack getBlueprintFolder()
    • getProgress

      public int getProgress()
    • getMaxProgress

      public int getMaxProgress()
    • isCriticalSlot

      protected boolean isCriticalSlot(int slot)
      Overrides:
      isCriticalSlot in class BaseMachineBlockEntity
    • saveAdditional

      protected void saveAdditional(net.minecraft.nbt.CompoundTag tag)
      Overrides:
      saveAdditional in class BaseMachineBlockEntity
    • load

      public void load(net.minecraft.nbt.CompoundTag tag)
      Overrides:
      load in class BaseMachineBlockEntity
    • onDataPacket

      public void onDataPacket(net.minecraft.network.Connection net, net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket pkt)
      Specified by:
      onDataPacket in interface net.minecraftforge.common.extensions.IForgeBlockEntity
      Overrides:
      onDataPacket in class BaseMachineBlockEntity
    • getUpdatePacket

      public net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket getUpdatePacket()
      Overrides:
      getUpdatePacket in class BaseMachineBlockEntity
    • getUpdateTag

      public net.minecraft.nbt.CompoundTag getUpdateTag()
      Overrides:
      getUpdateTag in class BaseMachineBlockEntity
    • getCapability

      @NotNull public <T> net.minecraftforge.common.util.LazyOptional<T> getCapability(@NotNull net.minecraftforge.common.capabilities.Capability<T> cap, @Nullable net.minecraft.core.Direction side)
      Specified by:
      getCapability in interface net.minecraftforge.common.capabilities.ICapabilityProvider
      Overrides:
      getCapability in class BaseMachineBlockEntity
    • setAllowedEnergySides

      public void setAllowedEnergySides(Set<net.minecraft.core.Direction> sides)
      Specified by:
      setAllowedEnergySides in interface IMultiblockSidedIO
    • getAllowedEnergySides

      public Set<net.minecraft.core.Direction> getAllowedEnergySides()
      Specified by:
      getAllowedEnergySides in interface IMultiblockSidedIO
    • setAllowedFluidSidesFromMultiblockStructure

      public void setAllowedFluidSidesFromMultiblockStructure(Set<net.minecraft.core.Direction> sides)
      Description copied from interface: IMultiblockSidedIO
      Вызывается при постройке мультиблока, если в fluidSideMap задан символ контроллера. worldSides — разрешённые стороны после поворота FACING; пустой набор = закрыть все грани контроллера для жидкости.
      Specified by:
      setAllowedFluidSidesFromMultiblockStructure in interface IMultiblockSidedIO
    • setAllowedFluidSides

      public void setAllowedFluidSides(Set<net.minecraft.core.Direction> sides)
      Specified by:
      setAllowedFluidSides in interface IMultiblockSidedIO
    • getAllowedFluidSides

      public Set<net.minecraft.core.Direction> getAllowedFluidSides()
      Specified by:
      getAllowedFluidSides in interface IMultiblockSidedIO
    • onLoad

      public void onLoad()
      Specified by:
      onLoad in interface net.minecraftforge.common.extensions.IForgeBlockEntity
      Overrides:
      onLoad in class BaseMachineBlockEntity
    • invalidateCaps

      public void invalidateCaps()
      Specified by:
      invalidateCaps in interface net.minecraftforge.common.capabilities.ICapabilityProviderImpl<net.minecraft.world.level.block.entity.BlockEntity>
      Overrides:
      invalidateCaps in class BaseMachineBlockEntity
    • setRemoved

      public void setRemoved()
      Overrides:
      setRemoved in class BaseMachineBlockEntity
    • getClientRecipeIcon

      public net.minecraft.world.item.ItemStack getClientRecipeIcon()
      Cached recipe output icon for BER; refreshed when selectedRecipeId changes.
    • getRingAngle

      public float getRingAngle()
    • getPrevRingAngle

      public float getPrevRingAngle()
    • getArms

      public Object getArms()
    • ensureNetworkInitialized

      protected void ensureNetworkInitialized()
      Overrides:
      ensureNetworkInitialized in class BaseMachineBlockEntity