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
-
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, transmitterFields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from interface net.fabricmc.fabric.api.attachment.v1.AttachmentTarget
NBT_ATTACHMENT_KEY -
Constructor Summary
ConstructorsConstructorDescriptionSpeakerBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()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.voidThis is called whenever the block is deactivated (chunk unloaded, block broken, etc.) Use this to clean up the associated routers.voidloadAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider) voidloadTag(net.minecraft.nbt.CompoundTag tag) voidsaveAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider) voidstatic voidtick(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 com.codinglitch.simpleradio.central.AuditoryBlockEntity
getConnectionPosition, getRouter, getUpdatePacket, getUpdateTag, loadFromItem, saveTag, saveToItem, setLevel, tagFromComponents, validateMethods 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, triggerEventMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.fabricmc.fabric.api.attachment.v1.AttachmentTarget
getAttached, getAttachedOrCreate, getAttachedOrCreate, getAttachedOrElse, getAttachedOrGet, getAttachedOrSet, getAttachedOrThrow, hasAttached, modifyAttached, removeAttached, setAttachedMethods inherited from interface net.fabricmc.fabric.api.blockview.v2.RenderDataBlockEntity
getRenderDataMethods inherited from interface com.codinglitch.simpleradio.central.Socket
canConnect, canConnectTo, connect, disconnect, disconnect, distribute, getIdentifier, getReference, getWires, hasWire, hasWire, shortCircuitMethods 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:
setRemovedin classAuditoryBlockEntity
-
loadAdditional
public void loadAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider) - Overrides:
loadAdditionalin classnet.minecraft.world.level.block.entity.BlockEntity
-
saveAdditional
public void saveAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider) - Overrides:
saveAdditionalin classAuditoryBlockEntity
-
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:AuditoryBlockEntityThis 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:
deactivatein classAuditoryBlockEntity
-
activate
public void activate()Description copied from class:AuditoryBlockEntityThis 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:
activatein classAuditoryBlockEntity
-
loadTag
public void loadTag(net.minecraft.nbt.CompoundTag tag) - Overrides:
loadTagin classAuditoryBlockEntity
-