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

    Fields
    Modifier and Type
    Field
    Description
     

    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

    Constructors
    Modifier
    Constructor
    Description
    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 Summary

    Modifier and Type
    Method
    Description
    void
     
    abstract N
    createNode(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos)
     
    Returns the node.
     
     
    void
     
    void
     

    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

  • 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

      public RedstoneMode getRedstoneMode()
      Specified by:
      getRedstoneMode in interface IRedstoneConfigurable
    • setRedstoneMode

      public void setRedstoneMode(RedstoneMode mode)
      Specified by:
      setRedstoneMode in interface IRedstoneConfigurable
    • getNode

      @Nonnull public N 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 interface INetworkNodeProxy<N extends NetworkNode>
      Returns:
      the node
    • clearRemoved

      public void clearRemoved()
      Overrides:
      clearRemoved in class net.minecraft.world.level.block.entity.BlockEntity
    • onRemovedNotDueToChunkUnload

      public void onRemovedNotDueToChunkUnload()
      Overrides:
      onRemovedNotDueToChunkUnload in class BaseBlockEntity
    • getRemovedNode

      public N getRemovedNode()
    • createNode

      public abstract N createNode(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos)