Class PressureChamberValveBlockEntity

java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.level.block.entity.BlockEntity>
All Implemented Interfaces:
IAirListener, IGUIButtonSensitive, ILuaMethodProvider, IMinWorkingPressure, IDescSynced, IUpgradeHolder, net.minecraft.world.inventory.MenuConstructor, net.minecraft.world.MenuProvider, net.minecraft.world.Nameable, 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 PressureChamberValveBlockEntity extends AbstractAirHandlingBlockEntity implements IMinWorkingPressure, IAirListener, net.minecraft.world.MenuProvider
  • Field Details

    • multiBlockX

      public int multiBlockX
    • multiBlockY

      public int multiBlockY
    • multiBlockZ

      public int multiBlockZ
    • multiBlockSize

      public int multiBlockSize
    • hasGlass

      public boolean hasGlass
    • isValidRecipeInChamber

      public boolean isValidRecipeInChamber
    • isSufficientPressureInChamber

      public boolean isSufficientPressureInChamber
    • recipePressure

      public float recipePressure
    • renderedItems

      public final List<net.minecraft.world.item.ItemStack> renderedItems
    • accessoryValves

      public List<PressureChamberValveBlockEntity> accessoryValves
  • Constructor Details

    • PressureChamberValveBlockEntity

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

    • shouldRerenderChunkOnDescUpdate

      protected boolean shouldRerenderChunkOnDescUpdate()
      Overrides:
      shouldRerenderChunkOnDescUpdate in class AbstractPneumaticCraftBlockEntity
    • canConnectPneumatic

      public boolean canConnectPneumatic(net.minecraft.core.Direction side)
      Description copied from class: AbstractAirHandlingBlockEntity
      Checks if the given side of this BE can be pneumatically connected to.
      Overrides:
      canConnectPneumatic in class AbstractAirHandlingBlockEntity
      Parameters:
      side - the side to check
      Returns:
      true if connected, false otherwise
    • addConnectedPneumatics

      public List<IAirHandlerMachine> addConnectedPneumatics(List<IAirHandlerMachine> airHandlers)
      Description copied from interface: IAirListener
      With this method, you can add neighbouring air handlers that aren't physically adjacent, but should be considered connected for air dispersion logic. Used in Pressure Chamber Valves, for example, to make them connect when they are part of the same Pressure Chamber.
      Specified by:
      addConnectedPneumatics in interface IAirListener
      Parameters:
      airHandlers - add extra connected air handlers to this list
      Returns:
      the supplied list, for convenience
    • tickClient

      public void tickClient()
      Overrides:
      tickClient in class AbstractTickingBlockEntity
    • tickServer

      public void tickServer()
      Overrides:
      tickServer in class AbstractTickingBlockEntity
    • onLoad

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

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

      public void saveAdditional(net.minecraft.nbt.CompoundTag tag)
      Overrides:
      saveAdditional in class AbstractAirHandlingBlockEntity
    • onMultiBlockBreak

      public void onMultiBlockBreak()
    • onDescUpdate

      public void onDescUpdate()
      Specified by:
      onDescUpdate in interface IDescSynced
      Overrides:
      onDescUpdate in class AbstractPneumaticCraftBlockEntity
    • getPrimaryInventory

      public net.minecraftforge.items.IItemHandler getPrimaryInventory()
      Specified by:
      getPrimaryInventory in class AbstractPneumaticCraftBlockEntity
    • checkIfProperlyFormed

      public static boolean checkIfProperlyFormed(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos)
    • checkIfProperlyFormed

      public static boolean checkIfProperlyFormed(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, boolean forceRebuild)
    • getRenderBoundingBox

      public net.minecraft.world.phys.AABB getRenderBoundingBox()
      Specified by:
      getRenderBoundingBox in interface net.minecraftforge.common.extensions.IForgeBlockEntity
    • getMinWorkingPressure

      public float getMinWorkingPressure()
      Description copied from interface: IMinWorkingPressure
      Get the minimum pressure at which this machine can operate. Used for GUI display purposes (drawing the yellow region of the pressure gauge, but can also be checked elsewhere.
      Specified by:
      getMinWorkingPressure in interface IMinWorkingPressure
      Returns:
      the minimum pressure at which this machine can operate
    • createMenu

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