Class SolarCompressorBlockEntity

java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.level.block.entity.BlockEntity>
All Implemented Interfaces:
IGUIButtonSensitive, IHasBoundingBlocks, IHeatExchangingTE, ILuaMethodProvider, 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 SolarCompressorBlockEntity extends AbstractAirHandlingBlockEntity implements IHeatExchangingTE, net.minecraft.world.MenuProvider, IHasBoundingBlocks
  • Field Details

  • Constructor Details

    • SolarCompressorBlockEntity

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

    • getBoundingBlockEntityData

      @NotNull public @NotNull BoundingBlockEntityData getBoundingBlockEntityData()
      Description copied from interface: IHasBoundingBlocks
      Gets the BoundingBlockEntityData linked to the implementing block entity which stores all the data relevant to bounding blocks for the block entity
      Specified by:
      getBoundingBlockEntityData in interface IHasBoundingBlocks
      Returns:
      the BoundingBlockEntityData linked to the implementing block entity
    • isBroken

      public boolean isBroken()
      Returns if the compressor is broken
      Returns:
      if the compressor is broken
    • fixBroken

      public void fixBroken()
      Fixes the solar compressor (sets isBroken to false)
    • breakCompressor

      public void breakCompressor()
      Breaks solar compressor and dangerously vents all heat
    • getHeatEfficiency

      public float getHeatEfficiency()
      Returns the bonus heat efficiency for the compressor Base ambient temperature (39C or 312.15K) or less is efficiency of 1 Higher temperature scales efficiency up to 8 at 351.15C or 624.3K
      Returns:
      the bonus heat efficiency for the compressor
    • getPercentHeatEfficiency

      public int getPercentHeatEfficiency()
      Returns the percent for the heat efficiency of the solar compressor
      Returns:
      the percent for the heat efficiency of the solar compressor
    • getTemperature

      public int getTemperature()
      Returns the heat of the solar compressor
      Returns:
      the heat of the solar compressor
    • canGenerateAir

      public boolean canGenerateAir()
      Returns if the solar compressor block can generate air
      Returns:
      if the solar compressor block can generate air
    • canSeeSunlight

      public void canSeeSunlight()
      Sets if the solar compressor block can see the sun
    • getCanSeeSunlight

      public boolean getCanSeeSunlight()
      Returns if the solar compressor block can see the sun
      Returns:
      if the solar compressor block can see the sun
    • tickServer

      public void tickServer()
      Overrides:
      tickServer in class AbstractTickingBlockEntity
    • 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
    • getPrimaryInventory

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

      public net.minecraftforge.common.util.LazyOptional<IHeatExchangerLogic> getHeatCap(net.minecraft.core.Direction side)
      Overrides:
      getHeatCap in class AbstractPneumaticCraftBlockEntity
    • getAirRate

      public float getAirRate()
    • 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
    • getHeatExchanger

      @Nullable public @Nullable IHeatExchangerLogic getHeatExchanger(net.minecraft.core.Direction dir)
      Description copied from interface: IHeatExchangingTE
      Get the heat exchanger on the given face. This may return null iff the direction is not null.
      Specified by:
      getHeatExchanger in interface IHeatExchangingTE
      Parameters:
      dir - the side of the block to check, or null for the default/primary heat exchanger
      Returns:
      a heat exchanger
    • 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