Class SpeakerBlockEntity

java.lang.Object
net.minecraft.world.level.block.entity.BlockEntity
com.codinglitch.simpleradio.central.AuditoryBlockEntity
com.codinglitch.simpleradio.core.registry.blocks.SpeakerBlockEntity
All Implemented Interfaces:
Auricular, Socket, Speaking, net.fabricmc.fabric.api.attachment.v1.AttachmentTarget, net.fabricmc.fabric.api.blockview.v2.RenderDataBlockEntity

public class SpeakerBlockEntity extends AuditoryBlockEntity implements Speaking
  • 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.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 interface net.fabricmc.fabric.api.attachment.v1.AttachmentTarget

    NBT_ATTACHMENT_KEY
  • Constructor Summary

    Constructors
    Constructor
    Description
    SpeakerBlockEntity(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.
    void
    loadAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider)
     
    void
    loadTag(net.minecraft.nbt.CompoundTag tag)
     
    void
    saveAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider)
     
    void
     
    static void
    tick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, SpeakerBlockEntity blockEntity)
     

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

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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.fabricmc.fabric.api.attachment.v1.AttachmentTarget

    getAttached, getAttachedOrCreate, getAttachedOrCreate, getAttachedOrElse, getAttachedOrGet, getAttachedOrSet, getAttachedOrThrow, hasAttached, modifyAttached, removeAttached, setAttached

    Methods inherited from interface net.fabricmc.fabric.api.blockview.v2.RenderDataBlockEntity

    getRenderData

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

    canConnect, canConnectTo, connect, disconnect, disconnect, distribute, getIdentifier, getReference, getWires, hasWire, hasWire, shortCircuit

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

    setupSpeaker, startSpeaking, startSpeaking, stopSpeaking
  • Constructor Details

    • SpeakerBlockEntity

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

    • setRemoved

      public void setRemoved()
      Overrides:
      setRemoved in class AuditoryBlockEntity
    • 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
    • tick

      public static void tick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, SpeakerBlockEntity 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
    • loadTag

      public void loadTag(net.minecraft.nbt.CompoundTag tag)
      Overrides:
      loadTag in class AuditoryBlockEntity