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
FieldsModifier and TypeFieldDescriptionstatic final BlockEntitySynchronizationParameter<Integer,NetworkNodeBlockEntity<?>> Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNetworkNodeBlockEntity(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 TypeMethodDescriptionvoidabstract NcreateNode(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos) getNode()Returns the node.voidvoidsetRedstoneMode(RedstoneMode mode) Methods inherited from class com.refinedmods.refinedstorage.blockentity.BaseBlockEntity
getDataManager, getUpdatePacket, getUpdateTag, handleUpdateTag, onChunkUnloaded, onDataPacket, readUpdate, setChanged, setRemoved, writeUpdateMethods 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, triggerEventMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
areAttachmentsCompatible, deserializeAttachments, getData, hasData, serializeAttachmentsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, hasData, setDataMethods 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:
getRedstoneModein interfaceIRedstoneConfigurable
-
setRedstoneMode
- Specified by:
setRedstoneModein interfaceIRedstoneConfigurable
-
getNode
Description copied from interface:INetworkNodeProxyReturns 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:
getNodein interfaceINetworkNodeProxy<N extends NetworkNode>- Returns:
- the node
-
clearRemoved
public void clearRemoved()- Overrides:
clearRemovedin classnet.minecraft.world.level.block.entity.BlockEntity
-
onRemovedNotDueToChunkUnload
public void onRemovedNotDueToChunkUnload()- Overrides:
onRemovedNotDueToChunkUnloadin classBaseBlockEntity
-
getRemovedNode
-
createNode
public abstract N createNode(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos)
-