Class RadioBlockEntity
java.lang.Object
net.minecraft.world.level.block.entity.BlockEntity
com.codinglitch.simpleradio.core.registry.blocks.AuditoryBlockEntity
com.codinglitch.simpleradio.core.registry.blocks.RadioBlockEntity
- All Implemented Interfaces:
Auricular,Frequencing,Receiving,Socket,Speaking,Animatable,net.fabricmc.fabric.api.attachment.v1.AttachmentTarget,net.fabricmc.fabric.api.blockview.v2.RenderDataBlockEntity
public class RadioBlockEntity
extends AuditoryBlockEntity
implements Receiving, Speaking, Animatable
-
Field Summary
FieldsModifier and TypeFieldDescriptionintbooleanstatic final intfloatFields inherited from class com.codinglitch.simpleradio.core.registry.blocks.AuditoryBlockEntity
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
ConstructorsConstructorDescriptionRadioBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()intGet the current cached antenna power.floatgetTime()voidvoidload(net.minecraft.nbt.CompoundTag tag) voidloadTag(net.minecraft.nbt.CompoundTag tag) voidsaveAdditional(net.minecraft.nbt.CompoundTag tag) voidsaveToItem(net.minecraft.world.item.ItemStack stack) voidvoidsetTime(float time) static voidtick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState, RadioBlockEntity blockEntity) Methods inherited from class com.codinglitch.simpleradio.core.registry.blocks.AuditoryBlockEntity
getConnectionPosition, getRouter, getUpdatePacket, getUpdateTag, loadFromItem, saveTag, setLevelMethods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPosFromTag, getType, hasLevel, isRemoved, loadStatic, onlyOpCanSetNbt, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, triggerEventMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.codinglitch.simpleradio.core.central.Animatable
allocate, getAnim, play, tickMethods inherited from interface net.fabricmc.fabric.api.attachment.v1.AttachmentTarget
getAttached, getAttachedOrCreate, getAttachedOrCreate, getAttachedOrElse, getAttachedOrGet, getAttachedOrSet, getAttachedOrThrow, hasAttached, modifyAttached, removeAttached, setAttachedMethods inherited from interface com.codinglitch.simpleradio.api.central.Frequencing
appendTooltip, calculateAntennaPower, getAntennaBase, getDefaultFrequency, getDefaultModulation, getFrequency, getFrequency, markDirty, setFrequency, setFrequency, setFrequency, tick, validateLocation, validateLocationMethods inherited from interface com.codinglitch.simpleradio.api.central.Receiving
startReceiving, startReceiving, startReceiving, startReceiving, startReceiving, startReceiving, stopReceiving, stopReceivingMethods inherited from interface net.fabricmc.fabric.api.blockview.v2.RenderDataBlockEntity
getRenderDataMethods inherited from interface com.codinglitch.simpleradio.api.central.Socket
canConnect, canConnectTo, connect, disconnect, disconnect, distribute, getIdentifier, getReference, getWires, hasWire, hasWire, shortCircuitMethods inherited from interface com.codinglitch.simpleradio.api.central.Speaking
setupSpeaker, startSpeaking, startSpeaking, stopSpeaking, stopSpeaking, stopSpeaking
-
Field Details
-
isActive
public boolean isActive -
antennaPower
public int antennaPower -
time
public float time -
PLAYING
public static final int PLAYING- See Also:
-
-
Constructor Details
-
RadioBlockEntity
public RadioBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
getStates
- Specified by:
getStatesin interfaceAnimatable
-
getTime
public float getTime()- Specified by:
getTimein interfaceAnimatable
-
setTime
public void setTime(float time) - Specified by:
setTimein interfaceAnimatable
-
setRemoved
public void setRemoved()- Overrides:
setRemovedin classnet.minecraft.world.level.block.entity.BlockEntity
-
loadTag
public void loadTag(net.minecraft.nbt.CompoundTag tag) - Overrides:
loadTagin classAuditoryBlockEntity
-
load
public void load(net.minecraft.nbt.CompoundTag tag) - Overrides:
loadin classnet.minecraft.world.level.block.entity.BlockEntity
-
saveAdditional
public void saveAdditional(net.minecraft.nbt.CompoundTag tag) - Overrides:
saveAdditionalin classAuditoryBlockEntity
-
saveToItem
public void saveToItem(net.minecraft.world.item.ItemStack stack) - Overrides:
saveToItemin classnet.minecraft.world.level.block.entity.BlockEntity
-
tick
public static void tick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState, RadioBlockEntity blockEntity) -
inactivate
public void inactivate() -
activate
public void activate() -
getAntennaPower
public int getAntennaPower()Description copied from interface:FrequencingGet the current cached antenna power. Only works if the instance has overriden this method. Use this method instead ofFrequencing.calculateAntennaPower(BlockPos, Level)whenever possible.- Specified by:
getAntennaPowerin interfaceFrequencing- Returns:
- The antenna power
-