Class MachineGasCentrifugeBlockEntity

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.blockentity.BaseMachineBlockEntity
com.hbm_m.blockentity.machines.MachineGasCentrifugeBlockEntity
All Implemented Interfaces:
IFluidConnectorMK2, IFluidReceiverMK2, IFluidStandardReceiverMK2, IFluidUserMK2, NodeNet.ILoadedEntry, IEnergyConnector, IEnergyProvider, IEnergyReceiver, 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 MachineGasCentrifugeBlockEntity extends BaseMachineBlockEntity implements IFluidStandardReceiverMK2
Gas Centrifuge BlockEntity.

Faithful port of the 1.7.10 cascade-enrichment mechanic: a real piped fluid (UF6/PUF6/WATZ) is converted 1:1 into an internal "pseudo-fluid" stage, which is enriched over time (consuming energy) and periodically handed off to an adjacent Gas Centrifuge for the next enrichment stage, with tangible item byproducts produced at each cycle and at the final stage.

  • Field Details

    • data

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

    • MachineGasCentrifugeBlockEntity

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

    • tick

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

      public int getProcessingSpeed()
    • drops

      public void drops()
    • 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
    • isItemValidForSlot

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

      protected void setupFluidCapability()
      Overrides:
      setupFluidCapability 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
    • getContainerData

      public net.minecraft.world.inventory.ContainerData getContainerData()
    • getTank

      public FluidTank getTank()
    • getInputTank

      public PseudoFluidTank getInputTank()
    • getOutputTank

      public PseudoFluidTank getOutputTank()
    • isProgressing

      public boolean isProgressing()
    • getProgress

      public int getProgress()
    • getAnim

      public float getAnim(float partialTicks)
    • getReceivingTanks

      public FluidTank[] getReceivingTanks()
      Specified by:
      getReceivingTanks in interface IFluidStandardReceiverMK2
    • getAllTanks

      public FluidTank[] getAllTanks()
      Description copied from interface: IFluidUserMK2
      Все баки этой машины. Используется для display/debug.
      Specified by:
      getAllTanks in interface IFluidUserMK2
    • isLoaded

      public boolean isLoaded()
      Specified by:
      isLoaded in interface NodeNet.ILoadedEntry
    • canConnect

      public boolean canConnect(net.minecraft.world.level.material.Fluid fluid, net.minecraft.core.Direction fromDir)
      Description copied from interface: IFluidConnectorMK2
      Может ли этот коннектор принимать/отдавать жидкость указанного типа с указанной стороны.
      Specified by:
      canConnect in interface IFluidConnectorMK2
      Parameters:
      fluid - тип жидкости
      fromDir - направление ОТ ЭТОГО узла к соседу (сторона, через которую идёт соединение)
    • 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