Class TransmitterBlockEntity
java.lang.Object
net.minecraft.world.level.block.entity.BlockEntity
com.codinglitch.simpleradio.core.registry.blocks.AuditoryBlockEntity
com.codinglitch.simpleradio.core.registry.blocks.CatalyzingBlockEntity
com.codinglitch.simpleradio.core.registry.blocks.TransmitterBlockEntity
- All Implemented Interfaces:
Frequencing,Socket,Transmitting,net.fabricmc.fabric.api.attachment.v1.AttachmentTarget,net.fabricmc.fabric.api.blockview.v2.RenderDataBlockEntity
-
Field Summary
FieldsFields inherited from class com.codinglitch.simpleradio.core.registry.blocks.CatalyzingBlockEntity
catalyst, catalyzedFields 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
ConstructorsConstructorDescriptionTransmitterBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()net.minecraft.core.BlockPosintGet the current cached antenna power.voidvoidload(net.minecraft.nbt.CompoundTag tag) voidloadTag(net.minecraft.nbt.CompoundTag tag) voidMark this frequencing instance as dirty such that it will recalculate antenna strength at the next possible chance.voidsaveAdditional(net.minecraft.nbt.CompoundTag tag) voidsaveTag(net.minecraft.nbt.CompoundTag tag) voidsaveToItem(net.minecraft.world.item.ItemStack stack) voidstatic voidtick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState, TransmitterBlockEntity blockEntity) Methods inherited from class com.codinglitch.simpleradio.core.registry.blocks.CatalyzingBlockEntity
tick, trySwapCatalystMethods inherited from class com.codinglitch.simpleradio.core.registry.blocks.AuditoryBlockEntity
getConnectionPosition, getRouter, getUpdatePacket, getUpdateTag, loadFromItem, 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 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, setFrequency, setFrequency, setFrequency, tick, validateLocation, validateLocationMethods 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.Transmitting
startTransmitting, startTransmitting, startTransmitting, startTransmitting, startTransmitting, startTransmitting, stopTransmitting, stopTransmitting
-
Field Details
-
isActive
public boolean isActive -
isDirty
public boolean isDirty -
antennaPower
public int antennaPower
-
-
Constructor Details
-
TransmitterBlockEntity
public TransmitterBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
getAdaptorLocation
public net.minecraft.core.BlockPos getAdaptorLocation()- Specified by:
getAdaptorLocationin classCatalyzingBlockEntity
-
setRemoved
public void setRemoved()- Overrides:
setRemovedin classnet.minecraft.world.level.block.entity.BlockEntity
-
loadTag
public void loadTag(net.minecraft.nbt.CompoundTag tag) - Overrides:
loadTagin classCatalyzingBlockEntity
-
saveTag
public void saveTag(net.minecraft.nbt.CompoundTag tag) - Overrides:
saveTagin classCatalyzingBlockEntity
-
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
-
markDirty
public void markDirty()Description copied from interface:FrequencingMark this frequencing instance as dirty such that it will recalculate antenna strength at the next possible chance.- Specified by:
markDirtyin interfaceFrequencing
-
tick
public static void tick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState, TransmitterBlockEntity 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
-