Class ReinforcedChestBlockEntity

java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.level.block.entity.BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
me.desht.pneumaticcraft.common.block.entity.AbstractPneumaticCraftBlockEntity
me.desht.pneumaticcraft.common.block.entity.ReinforcedChestBlockEntity
All Implemented Interfaces:
IComparatorSupport, IGUIButtonSensitive, 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 ReinforcedChestBlockEntity extends AbstractPneumaticCraftBlockEntity implements net.minecraft.world.MenuProvider, IComparatorSupport
  • Field Details

  • Constructor Details

    • ReinforcedChestBlockEntity

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

    • 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()
      Overrides:
      getInventoryCap in class AbstractPneumaticCraftBlockEntity
    • saveAdditional

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

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

      public boolean shouldPreserveStateOnBreak()
      Description copied from class: AbstractPneumaticCraftBlockEntity
      Should this block entity preserve its state (currently: upgrades and stored air) when broken? By default this is true when sneak-wrenched, and false when broken by pick.
      Overrides:
      shouldPreserveStateOnBreak in class AbstractPneumaticCraftBlockEntity
      Returns:
      true if state should be preserved, false otherwise
    • 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.
    • 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
    • maybeFillWithLoot

      public void maybeFillWithLoot(net.minecraft.world.entity.player.Player player)
    • getComparatorValue

      public int getComparatorValue()
      Specified by:
      getComparatorValue in interface IComparatorSupport