Class VacuumTrapBlockEntity

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

  • Constructor Details

    • VacuumTrapBlockEntity

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

    • tickCommonPre

      public void tickCommonPre()
      Description copied from class: AbstractTickingBlockEntity
      Called on both server and client, before anything else
      Overrides:
      tickCommonPre in class AbstractAirHandlingBlockEntity
    • tickClient

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

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

      @NotNull public @NotNull net.minecraftforge.common.util.LazyOptional<net.minecraftforge.fluids.capability.IFluidHandler> getFluidCap(net.minecraft.core.Direction side)
      Overrides:
      getFluidCap in class AbstractPneumaticCraftBlockEntity
    • getFluidTank

      public net.minecraftforge.fluids.IFluidTank getFluidTank()
    • getSerializableTanks

      @Nonnull public Map<String,PNCFluidTank> getSerializableTanks()
      Description copied from interface: ISerializableTanks
      Get a mapping of all tanks; this maps a tag name, which is used as the serialization key, to a fluid tank.
      Specified by:
      getSerializableTanks in interface ISerializableTanks
      Returns:
      a map of tag names to tanks
    • getPrimaryInventory

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

      @Nonnull protected net.minecraftforge.common.util.LazyOptional<net.minecraftforge.items.IItemHandler> getInventoryCap(net.minecraft.core.Direction side)
      Overrides:
      getInventoryCap 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
    • 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 windowId, net.minecraft.world.entity.player.Inventory inv, net.minecraft.world.entity.player.Player player)
      Specified by:
      createMenu in interface net.minecraft.world.inventory.MenuConstructor
    • 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
    • getContentsToDrop

      public void getContentsToDrop(net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> drops)
      Description copied from class: AbstractPneumaticCraftBlockEntity
      Collect all items which should be dropped when this BE is broken. Override and extend this in subclassing BE's which have extra inventories to be dropped.
      Overrides:
      getContentsToDrop in class AbstractPneumaticCraftBlockEntity
      Parameters:
      drops - list in which to collect dropped items
    • serializeExtraItemData

      public void serializeExtraItemData(net.minecraft.nbt.CompoundTag blockEntityTag, boolean preserveState)
      Description copied from class: AbstractPneumaticCraftBlockEntity
      Get any extra data to be serialized onto a dropped item stack. The supplied tag is the "BlockEntityTag" subtag of the item's NBT data, so will be automatically deserialized into the BE (i.e. available to BlockEntity.load(CompoundTag) method) when the itemblock is next placed.
      Overrides:
      serializeExtraItemData in class AbstractPneumaticCraftBlockEntity
      Parameters:
      blockEntityTag - the existing "BlockEntityTag" subtag to add data to
      preserveState - true when dropped with a wrench, false when broken with a pickaxe etc.
    • isOpen

      public boolean isOpen()
    • getRangeManager

      public RangeManager getRangeManager()
      Specified by:
      getRangeManager in interface IRangedTE
    • getRenderBoundingBox

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