Class AbstractExporterBlockEntity

java.lang.Object
net.minecraft.world.level.block.entity.BlockEntity
com.refinedmods.refinedstorage.common.api.support.network.AbstractNetworkNodeContainerBlockEntity<com.refinedmods.refinedstorage.api.network.impl.node.exporter.ExporterNetworkNode>
com.refinedmods.refinedstorage.common.support.network.AbstractBaseNetworkNodeContainerBlockEntity<com.refinedmods.refinedstorage.api.network.impl.node.exporter.ExporterNetworkNode>
com.refinedmods.refinedstorage.common.support.AbstractCableLikeBlockEntity<com.refinedmods.refinedstorage.api.network.impl.node.exporter.ExporterNetworkNode>
com.refinedmods.refinedstorage.common.exporter.AbstractExporterBlockEntity
All Implemented Interfaces:
ConfigurationCardTarget, AmountOverride, NetworkItemTargetBlockEntity, BlockEntityWithDrops, ExtendedMenuProvider<ResourceContainerData>, NetworkNodeExtendedMenuProvider<ResourceContainerData>, NetworkNodeMenuProvider, PlayerAwareBlockEntity, net.minecraft.world.inventory.MenuConstructor, net.minecraft.world.MenuProvider, net.minecraft.world.Nameable

public abstract class AbstractExporterBlockEntity extends AbstractCableLikeBlockEntity<com.refinedmods.refinedstorage.api.network.impl.node.exporter.ExporterNetworkNode> implements AmountOverride, BlockEntityWithDrops, NetworkNodeExtendedMenuProvider<ResourceContainerData>
  • Constructor Details

    • AbstractExporterBlockEntity

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

    • getUpgrades

      public List<net.minecraft.world.item.ItemStack> getUpgrades()
      Specified by:
      getUpgrades in interface ConfigurationCardTarget
    • addUpgrade

      public boolean addUpgrade(net.minecraft.world.item.ItemStack upgradeStack)
      Specified by:
      addUpgrade in interface ConfigurationCardTarget
    • initialize

      protected void initialize(net.minecraft.server.level.ServerLevel level, net.minecraft.core.Direction direction)
      Overrides:
      initialize in class AbstractBaseNetworkNodeContainerBlockEntity<com.refinedmods.refinedstorage.api.network.impl.node.exporter.ExporterNetworkNode>
    • saveAdditional

      public void saveAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider)
      Overrides:
      saveAdditional in class AbstractCableLikeBlockEntity<com.refinedmods.refinedstorage.api.network.impl.node.exporter.ExporterNetworkNode>
    • loadAdditional

      public void loadAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider)
      Overrides:
      loadAdditional in class AbstractCableLikeBlockEntity<com.refinedmods.refinedstorage.api.network.impl.node.exporter.ExporterNetworkNode>
    • writeConfiguration

      public void writeConfiguration(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider)
      Specified by:
      writeConfiguration in interface ConfigurationCardTarget
      Overrides:
      writeConfiguration in class AbstractBaseNetworkNodeContainerBlockEntity<com.refinedmods.refinedstorage.api.network.impl.node.exporter.ExporterNetworkNode>
    • readConfiguration

      public void readConfiguration(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider)
      Specified by:
      readConfiguration in interface ConfigurationCardTarget
      Overrides:
      readConfiguration in class AbstractBaseNetworkNodeContainerBlockEntity<com.refinedmods.refinedstorage.api.network.impl.node.exporter.ExporterNetworkNode>
    • getDrops

      public final net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getDrops()
      Specified by:
      getDrops in interface BlockEntityWithDrops
    • getName

      public net.minecraft.network.chat.Component getName()
      Specified by:
      getName in interface net.minecraft.world.Nameable
    • createMenu

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

      public ResourceContainerData getMenuData()
      Specified by:
      getMenuData in interface ExtendedMenuProvider<ResourceContainerData>
    • getMenuCodec

      public net.minecraft.network.codec.StreamEncoder<net.minecraft.network.RegistryFriendlyByteBuf,ResourceContainerData> getMenuCodec()
      Specified by:
      getMenuCodec in interface ExtendedMenuProvider<ResourceContainerData>
    • overrideAmount

      public long overrideAmount(ResourceKey resource, long amount, LongSupplier currentAmountSupplier)
      Description copied from interface: AmountOverride
      Modifies the requested amount to a new amount.
      Specified by:
      overrideAmount in interface AmountOverride
      Parameters:
      resource - the resource
      amount - the original requested amount
      currentAmountSupplier - the current amount present in the source
      Returns:
      the new requested amount, may be 0
    • doesBlockStateChangeWarrantNetworkNodeUpdate

      protected boolean doesBlockStateChangeWarrantNetworkNodeUpdate(net.minecraft.world.level.block.state.BlockState oldBlockState, net.minecraft.world.level.block.state.BlockState newBlockState)
      Overrides:
      doesBlockStateChangeWarrantNetworkNodeUpdate in class AbstractBaseNetworkNodeContainerBlockEntity<com.refinedmods.refinedstorage.api.network.impl.node.exporter.ExporterNetworkNode>