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>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.BlockEntity.DataComponentInput
-
Field Summary
Fields inherited from class com.refinedmods.refinedstorage.common.support.AbstractCableLikeBlockEntity
connections
Fields inherited from class com.refinedmods.refinedstorage.common.support.network.AbstractBaseNetworkNodeContainerBlockEntity
ticker
Fields inherited from class com.refinedmods.refinedstorage.common.api.support.network.AbstractNetworkNodeContainerBlockEntity
containers, mainNetworkNode
Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPosition
Fields inherited from interface com.refinedmods.refinedstorage.common.api.support.network.AmountOverride
NONE
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractExporterBlockEntity
(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionboolean
addUpgrade
(net.minecraft.world.item.ItemStack upgradeStack) net.minecraft.world.inventory.AbstractContainerMenu
createMenu
(int syncId, net.minecraft.world.entity.player.Inventory inventory, net.minecraft.world.entity.player.Player player) protected boolean
doesBlockStateChangeWarrantNetworkNodeUpdate
(net.minecraft.world.level.block.state.BlockState oldBlockState, net.minecraft.world.level.block.state.BlockState newBlockState) final net.minecraft.core.NonNullList
<net.minecraft.world.item.ItemStack> getDrops()
net.minecraft.network.codec.StreamEncoder
<net.minecraft.network.RegistryFriendlyByteBuf, ResourceContainerData> net.minecraft.network.chat.Component
getName()
List
<net.minecraft.world.item.ItemStack> protected void
initialize
(net.minecraft.server.level.ServerLevel level, net.minecraft.core.Direction direction) void
loadAdditional
(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider) long
overrideAmount
(ResourceKey resource, long amount, LongSupplier currentAmountSupplier) Modifies the requested amount to a new amount.void
readConfiguration
(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider) void
saveAdditional
(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider) void
writeConfiguration
(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider) Methods inherited from class com.refinedmods.refinedstorage.common.support.AbstractCableLikeBlockEntity
getConnections, getUpdatePacket, getUpdateTag, setBlockState, updateConnections
Methods inherited from class com.refinedmods.refinedstorage.common.support.network.AbstractBaseNetworkNodeContainerBlockEntity
activenessChanged, applyImplicitComponents, calculateActive, collectImplicitComponents, createMainContainer, doWork, getCustomName, getDisplayName, getFakePlayer, getNetworkForItem, getRedstoneMode, hasRedstoneMode, initialize, isPlacedBy, overrideName, setCustomName, setLevel, setPlacedBy, setRedstoneMode, updateActiveness
Methods inherited from class com.refinedmods.refinedstorage.common.api.support.network.AbstractNetworkNodeContainerBlockEntity
clearRemoved, containerInitialized, createContainerProvider, getContainerProvider, setRemoved
Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, collectComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPosFromTag, getType, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, onlyOpCanSetNbt, parseCustomNameSafe, removeComponentsFromTag, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setChanged, setChanged, setComponents, triggerEvent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.world.MenuProvider
getDisplayName
Methods inherited from interface net.minecraft.world.Nameable
hasCustomName
Methods inherited from interface com.refinedmods.refinedstorage.common.support.containermenu.NetworkNodeMenuProvider
canOpen, getContainerProvider
-
Constructor Details
-
AbstractExporterBlockEntity
protected AbstractExporterBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
getUpgrades
- Specified by:
getUpgrades
in interfaceConfigurationCardTarget
-
addUpgrade
public boolean addUpgrade(net.minecraft.world.item.ItemStack upgradeStack) - Specified by:
addUpgrade
in interfaceConfigurationCardTarget
-
initialize
protected void initialize(net.minecraft.server.level.ServerLevel level, net.minecraft.core.Direction direction) - Overrides:
initialize
in classAbstractBaseNetworkNodeContainerBlockEntity<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 classAbstractCableLikeBlockEntity<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 classAbstractCableLikeBlockEntity<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 interfaceConfigurationCardTarget
- Overrides:
writeConfiguration
in classAbstractBaseNetworkNodeContainerBlockEntity<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 interfaceConfigurationCardTarget
- Overrides:
readConfiguration
in classAbstractBaseNetworkNodeContainerBlockEntity<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 interfaceBlockEntityWithDrops
-
getName
public net.minecraft.network.chat.Component getName()- Specified by:
getName
in interfacenet.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 interfacenet.minecraft.world.inventory.MenuConstructor
-
getMenuData
- Specified by:
getMenuData
in interfaceExtendedMenuProvider<ResourceContainerData>
-
getMenuCodec
public net.minecraft.network.codec.StreamEncoder<net.minecraft.network.RegistryFriendlyByteBuf,ResourceContainerData> getMenuCodec()- Specified by:
getMenuCodec
in interfaceExtendedMenuProvider<ResourceContainerData>
-
overrideAmount
Description copied from interface:AmountOverride
Modifies the requested amount to a new amount.- Specified by:
overrideAmount
in interfaceAmountOverride
- Parameters:
resource
- the resourceamount
- the original requested amountcurrentAmountSupplier
- 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 classAbstractBaseNetworkNodeContainerBlockEntity<com.refinedmods.refinedstorage.api.network.impl.node.exporter.ExporterNetworkNode>
-