Class AbstractGridBlockEntity
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.grid.GridNetworkNode>
com.refinedmods.refinedstorage.common.support.network.AbstractBaseNetworkNodeContainerBlockEntity<com.refinedmods.refinedstorage.api.network.impl.node.grid.GridNetworkNode>
com.refinedmods.refinedstorage.common.grid.AbstractGridBlockEntity
- All Implemented Interfaces:
PreviewProvider,ConfigurationCardTarget,Grid,NetworkItemTargetBlockEntity,PlayerAwareBlockEntity,net.minecraft.world.Nameable
- Direct Known Subclasses:
CraftingGridBlockEntity,GridBlockEntity,PatternGridBlockEntity
public abstract class AbstractGridBlockEntity
extends AbstractBaseNetworkNodeContainerBlockEntity<com.refinedmods.refinedstorage.api.network.impl.node.grid.GridNetworkNode>
implements Grid
-
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.network.AbstractBaseNetworkNodeContainerBlockEntity
tickerFields inherited from class com.refinedmods.refinedstorage.common.api.support.network.AbstractNetworkNodeContainerBlockEntity
containers, mainNetworkNodeFields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPosition -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractGridBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<? extends AbstractGridBlockEntity> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, long energyUsage) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddWatcher(GridWatcher watcher, Class<? extends Actor> actorType) booleancanMenuStayOpen(net.minecraft.world.entity.player.Player player) protected InWorldNetworkNodeContainercreateMainContainer(com.refinedmods.refinedstorage.api.network.impl.node.grid.GridNetworkNode networkNode) createOperations(ResourceType resourceType, net.minecraft.server.level.ServerPlayer player) protected booleandoesBlockStateChangeWarrantNetworkNodeUpdate(net.minecraft.world.level.block.state.BlockState oldBlockState, net.minecraft.world.level.block.state.BlockState newBlockState) getMaxAmount(ResourceKey resource, CancellationToken cancellationToken) getPreview(ResourceKey resource, long amount, CancellationToken cancellationToken) getResources(Class<? extends Actor> actorType) getTreePreview(ResourceKey resource, long amount, CancellationToken cancellationToken) booleanvoidremoveWatcher(GridWatcher watcher) startTask(ResourceKey resource, long amount, Actor actor, boolean notify, CancellationToken cancellationToken) Methods inherited from class com.refinedmods.refinedstorage.common.support.network.AbstractBaseNetworkNodeContainerBlockEntity
activenessChanged, applyImplicitComponents, calculateActive, collectImplicitComponents, doWork, getCustomName, getDebugNetworkId, getDisplayName, getFakePlayer, getNetworkForItem, getRedstoneMode, getUpdatePacket, getUpdateTag, hasRedstoneMode, initialize, initialize, isPlacedBy, loadAdditional, overrideName, readConfiguration, saveAdditional, setBlockState, setCustomName, setLevel, setPlacedBy, setRedstoneMode, updateActiveness, updateDebugNetworkId, writeConfigurationMethods inherited from class com.refinedmods.refinedstorage.common.api.support.network.AbstractNetworkNodeContainerBlockEntity
clearRemoved, containerInitialized, createContainerProvider, getContainerProvider, setRemovedMethods 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, triggerEventMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.refinedmods.refinedstorage.common.api.configurationcard.ConfigurationCardTarget
addUpgrade, getUpgradesMethods inherited from interface net.minecraft.world.Nameable
getName, hasCustomName
-
Constructor Details
-
AbstractGridBlockEntity
protected AbstractGridBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<? extends AbstractGridBlockEntity> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, long energyUsage)
-
-
Method Details
-
createMainContainer
protected InWorldNetworkNodeContainer createMainContainer(com.refinedmods.refinedstorage.api.network.impl.node.grid.GridNetworkNode networkNode) - Overrides:
createMainContainerin classAbstractBaseNetworkNodeContainerBlockEntity<com.refinedmods.refinedstorage.api.network.impl.node.grid.GridNetworkNode>
-
getResources
- Specified by:
getResourcesin interfaceGrid
-
getAutocraftableResources
- Specified by:
getAutocraftableResourcesin interfaceGrid
-
createOperations
public GridOperations createOperations(ResourceType resourceType, net.minecraft.server.level.ServerPlayer player) - Specified by:
createOperationsin interfaceGrid
-
isGridActive
public boolean isGridActive()- Specified by:
isGridActivein interfaceGrid
-
getItemStorage
- Specified by:
getItemStoragein interfaceGrid
-
addWatcher
- Specified by:
addWatcherin interfaceGrid
-
removeWatcher
- Specified by:
removeWatcherin interfaceGrid
-
getPreview
public CompletableFuture<Optional<Preview>> getPreview(ResourceKey resource, long amount, CancellationToken cancellationToken) - Specified by:
getPreviewin interfacePreviewProvider
-
getTreePreview
public CompletableFuture<Optional<TreePreview>> getTreePreview(ResourceKey resource, long amount, CancellationToken cancellationToken) - Specified by:
getTreePreviewin interfacePreviewProvider
-
getMaxAmount
public CompletableFuture<Long> getMaxAmount(ResourceKey resource, CancellationToken cancellationToken) - Specified by:
getMaxAmountin interfacePreviewProvider
-
startTask
public Optional<TaskId> startTask(ResourceKey resource, long amount, Actor actor, boolean notify, CancellationToken cancellationToken) - Specified by:
startTaskin interfacePreviewProvider
-
doesBlockStateChangeWarrantNetworkNodeUpdate
protected boolean doesBlockStateChangeWarrantNetworkNodeUpdate(net.minecraft.world.level.block.state.BlockState oldBlockState, net.minecraft.world.level.block.state.BlockState newBlockState) - Overrides:
doesBlockStateChangeWarrantNetworkNodeUpdatein classAbstractBaseNetworkNodeContainerBlockEntity<com.refinedmods.refinedstorage.api.network.impl.node.grid.GridNetworkNode>
-
canMenuStayOpen
public boolean canMenuStayOpen(net.minecraft.world.entity.player.Player player) - Specified by:
canMenuStayOpenin interfaceGrid
-