Class NetworkNodeBlockEntity<N extends NetworkNode>
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
com.refinedmods.refinedstorage.blockentity.BaseBlockEntity
com.refinedmods.refinedstorage.blockentity.NetworkNodeBlockEntity<N>
- All Implemented Interfaces:
INetworkNodeProxy<N>
,IRedstoneConfigurable
,net.neoforged.neoforge.attachment.IAttachmentHolder
,net.neoforged.neoforge.common.extensions.IBlockEntityExtension
,net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
- Direct Known Subclasses:
CableBlockEntity
,ConstructorBlockEntity
,CrafterBlockEntity
,CrafterManagerBlockEntity
,CraftingMonitorBlockEntity
,DestructorBlockEntity
,DetectorBlockEntity
,DiskDriveBlockEntity
,DiskManipulatorBlockEntity
,ExporterBlockEntity
,ExternalStorageBlockEntity
,FluidInterfaceBlockEntity
,FluidStorageBlockEntity
,GridBlockEntity
,ImporterBlockEntity
,InterfaceBlockEntity
,NetworkReceiverBlockEntity
,NetworkTransmitterBlockEntity
,RelayBlockEntity
,SecurityManagerBlockEntity
,StorageBlockEntity
,StorageMonitorBlockEntity
,WirelessTransmitterBlockEntity
public abstract class NetworkNodeBlockEntity<N extends NetworkNode>
extends BaseBlockEntity
implements INetworkNodeProxy<N>, IRedstoneConfigurable
-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
net.neoforged.neoforge.attachment.AttachmentHolder.AsField
-
Field Summary
Modifier and TypeFieldDescriptionstatic final BlockEntitySynchronizationParameter<Integer,
NetworkNodeBlockEntity<?>> Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPosition
Fields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEY
-
Constructor Summary
ModifierConstructorDescriptionprotected
NetworkNodeBlockEntity
(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, BlockEntitySynchronizationSpec syncSpec, Class<N> networkNodeClass) -
Method Summary
Modifier and TypeMethodDescriptionvoid
abstract N
createNode
(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos) getNode()
Returns the node.void
void
setRedstoneMode
(RedstoneMode mode) Methods inherited from class com.refinedmods.refinedstorage.blockentity.BaseBlockEntity
getDataManager, getUpdatePacket, getUpdateTag, handleUpdateTag, onChunkUnloaded, onDataPacket, readUpdate, setChanged, setRemoved, writeUpdate
Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, load, loadStatic, onlyOpCanSetNbt, saveAdditional, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setData, setLevel, triggerEvent
Methods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
areAttachmentsCompatible, deserializeAttachments, getData, hasData, serializeAttachments
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, hasData, setData
Methods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
deserializeNBT, getModelData, hasCustomOutlineRendering, invalidateCapabilities, onLoad, requestModelDataUpdate, serializeNBT
-
Field Details
-
REDSTONE_MODE
public static final BlockEntitySynchronizationParameter<Integer,NetworkNodeBlockEntity<?>> REDSTONE_MODE
-
-
Constructor Details
-
NetworkNodeBlockEntity
protected NetworkNodeBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, BlockEntitySynchronizationSpec syncSpec, Class<N> networkNodeClass)
-
-
Method Details
-
getRedstoneMode
- Specified by:
getRedstoneMode
in interfaceIRedstoneConfigurable
-
setRedstoneMode
- Specified by:
setRedstoneMode
in interfaceIRedstoneConfigurable
-
getNode
Description copied from interface:INetworkNodeProxy
Returns the node. Needs to work on the client and the server. If there is no node present, don't silently return null but throw an exception since the game is in a bad state if that happens.- Specified by:
getNode
in interfaceINetworkNodeProxy<N extends NetworkNode>
- Returns:
- the node
-
clearRemoved
public void clearRemoved()- Overrides:
clearRemoved
in classnet.minecraft.world.level.block.entity.BlockEntity
-
onRemovedNotDueToChunkUnload
public void onRemovedNotDueToChunkUnload()- Overrides:
onRemovedNotDueToChunkUnload
in classBaseBlockEntity
-
getRemovedNode
-
createNode
public abstract N createNode(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos)
-