Class ReceiverBlockEntity

java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
All Implemented Interfaces:
Frequencing, Receiving, Socket, net.neoforged.neoforge.attachment.IAttachmentHolder, net.neoforged.neoforge.common.extensions.IBlockEntityExtension

public class ReceiverBlockEntity extends CatalyzingBlockEntity implements Receiving
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity

    net.minecraft.world.level.block.entity.BlockEntity.DataComponentInput

    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
    int
     
    boolean
     

    Fields inherited from class com.codinglitch.simpleradio.core.registry.blocks.CatalyzingBlockEntity

    catalyst, catalyzed

    Fields inherited from class com.codinglitch.simpleradio.central.AuditoryBlockEntity

    active, frequency, id, listener, receiver, speaker, transmitter

    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
    Constructor
    Description
    ReceiverBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    This is called whenever the block is initially activated (placed, on world load, chunk loaded, etc.) Use this to create and register the associated routers for this block.
    void
    This is called whenever the block is deactivated (chunk unloaded, block broken, etc.) Use this to clean up the associated routers.
    net.minecraft.core.BlockPos
     
    int
    Get the current cached antenna power.
    void
    loadAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider)
     
    void
    loadTag(net.minecraft.nbt.CompoundTag tag)
     
    void
    Mark this frequencing instance as dirty such that it will recalculate antenna strength at the next possible chance.
    void
    saveAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider)
     
    void
    saveTag(net.minecraft.nbt.CompoundTag tag)
     
    void
     
    static void
    tick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState, ReceiverBlockEntity blockEntity)
     

    Methods inherited from class com.codinglitch.simpleradio.core.registry.blocks.CatalyzingBlockEntity

    tick, trySwapCatalyst

    Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity

    addEntityType, applyComponents, applyComponentsFromItemStack, applyImplicitComponents, clearRemoved, collectComponents, collectImplicitComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, onlyOpCanSetNbt, parseCustomNameSafe, removeComponentsFromTag, removeData, saveCustomAndMetadata, saveCustomOnly, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, syncData, triggerEvent

    Methods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder

    deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, 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, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData, syncData

    Methods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension

    getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate

    Methods inherited from interface com.codinglitch.simpleradio.central.Receiving

    startReceiving, startReceiving, startReceiving, startReceiving, startReceiving, startReceiving, stopReceiving

    Methods inherited from interface com.codinglitch.simpleradio.central.Socket

    canConnect, canConnectTo, connect, disconnect, disconnect, distribute, getIdentifier, getReference, getWires, hasWire, hasWire, shortCircuit
  • Field Details

    • isDirty

      public boolean isDirty
    • antennaPower

      public int antennaPower
  • Constructor Details

    • ReceiverBlockEntity

      public ReceiverBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
  • Method Details

    • getAdaptorLocation

      public net.minecraft.core.BlockPos getAdaptorLocation()
      Specified by:
      getAdaptorLocation in class CatalyzingBlockEntity
    • setRemoved

      public void setRemoved()
      Overrides:
      setRemoved in class AuditoryBlockEntity
    • loadTag

      public void loadTag(net.minecraft.nbt.CompoundTag tag)
      Overrides:
      loadTag in class CatalyzingBlockEntity
    • saveTag

      public void saveTag(net.minecraft.nbt.CompoundTag tag)
      Overrides:
      saveTag in class CatalyzingBlockEntity
    • loadAdditional

      public void loadAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider)
      Overrides:
      loadAdditional in class net.minecraft.world.level.block.entity.BlockEntity
    • saveAdditional

      public void saveAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider)
      Overrides:
      saveAdditional in class AuditoryBlockEntity
    • markDirty

      public void markDirty()
      Description copied from interface: Frequencing
      Mark this frequencing instance as dirty such that it will recalculate antenna strength at the next possible chance.
      Specified by:
      markDirty in interface Frequencing
    • tick

      public static void tick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState, ReceiverBlockEntity blockEntity)
    • deactivate

      public void deactivate()
      Description copied from class: AuditoryBlockEntity
      This is called whenever the block is deactivated (chunk unloaded, block broken, etc.) Use this to clean up the associated routers.

      This method will also set all invalid routers to null.

      Overrides:
      deactivate in class AuditoryBlockEntity
    • activate

      public void activate()
      Description copied from class: AuditoryBlockEntity
      This is called whenever the block is initially activated (placed, on world load, chunk loaded, etc.) Use this to create and register the associated routers for this block.
      Overrides:
      activate in class AuditoryBlockEntity
    • getAntennaPower

      public int getAntennaPower()
      Description copied from interface: Frequencing
      Get the current cached antenna power. Only works if the instance has overridden this method. Use this method instead of Frequencing.calculateAntennaPower(BlockPos, Level) whenever possible.
      Specified by:
      getAntennaPower in interface Frequencing
      Returns:
      The antenna power