Class AuditoryBlockEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
com.codinglitch.simpleradio.core.registry.blocks.AuditoryBlockEntity
- All Implemented Interfaces:
Socket,net.neoforged.neoforge.attachment.IAttachmentHolder,net.neoforged.neoforge.common.extensions.IBlockEntityExtension,net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
- Direct Known Subclasses:
CatalyzingBlockEntity,MicrophoneBlockEntity,RadioBlockEntity,SpeakerBlockEntity
public abstract class AuditoryBlockEntity
extends net.minecraft.world.level.block.entity.BlockEntity
implements Socket
A block entity which interacts with audio in some way;
-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
net.neoforged.neoforge.attachment.AttachmentHolder.AsField -
Field Summary
FieldsModifier and TypeFieldDescription@Nullable RadioListener@Nullable RadioReceiver@Nullable RadioSpeaker@Nullable RadioTransmitterFields 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
ConstructorsConstructorDescriptionAuditoryBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> blockEntityType, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.phys.Vec3Override this to expose a given router to wires.@Nullable net.minecraft.network.protocol.Packet<net.minecraft.network.protocol.game.ClientGamePacketListener>net.minecraft.nbt.CompoundTagvoidloadFromItem(net.minecraft.world.item.ItemStack stack) voidloadTag(net.minecraft.nbt.CompoundTag tag) protected voidsaveAdditional(net.minecraft.nbt.CompoundTag tag) voidsaveTag(net.minecraft.nbt.CompoundTag tag) voidsetLevel(net.minecraft.world.level.Level level) Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, load, loadStatic, onlyOpCanSetNbt, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setData, setRemoved, 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, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate, serializeNBTMethods inherited from interface com.codinglitch.simpleradio.api.central.Socket
canConnect, canConnectTo, connect, disconnect, disconnect, distribute, getIdentifier, getReference, getWires, hasWire, hasWire, shortCircuit
-
Field Details
-
frequency
-
id
-
receiver
-
transmitter
-
listener
-
speaker
-
-
Constructor Details
-
AuditoryBlockEntity
public AuditoryBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> blockEntityType, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
setLevel
public void setLevel(net.minecraft.world.level.Level level) - Overrides:
setLevelin classnet.minecraft.world.level.block.entity.BlockEntity
-
getRouter
Description copied from interface:SocketOverride this to expose a given router to wires.
Allows blocks with more than one router to choose which of their routers wires will connect to. -
getConnectionPosition
public net.minecraft.world.phys.Vec3 getConnectionPosition() -
loadFromItem
public void loadFromItem(net.minecraft.world.item.ItemStack stack) -
loadTag
public void loadTag(net.minecraft.nbt.CompoundTag tag) -
saveTag
public void saveTag(net.minecraft.nbt.CompoundTag tag) -
saveAdditional
protected void saveAdditional(net.minecraft.nbt.CompoundTag tag) - Overrides:
saveAdditionalin classnet.minecraft.world.level.block.entity.BlockEntity
-
getUpdateTag
public net.minecraft.nbt.CompoundTag getUpdateTag()- Overrides:
getUpdateTagin classnet.minecraft.world.level.block.entity.BlockEntity
-
getUpdatePacket
@Nullable public @Nullable net.minecraft.network.protocol.Packet<net.minecraft.network.protocol.game.ClientGamePacketListener> getUpdatePacket()- Overrides:
getUpdatePacketin classnet.minecraft.world.level.block.entity.BlockEntity
-