Class ReceiverBlockEntity
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.level.block.entity.BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
com.codinglitch.simpleradio.central.AuditoryBlockEntity
com.codinglitch.simpleradio.core.registry.blocks.CatalyzingBlockEntity
com.codinglitch.simpleradio.core.registry.blocks.ReceiverBlockEntity
- All Implemented Interfaces:
Frequencing,Receiving,Socket,net.minecraftforge.common.capabilities.ICapabilityProvider,net.minecraftforge.common.capabilities.ICapabilityProviderImpl<net.minecraft.world.level.block.entity.BlockEntity>,net.minecraftforge.common.capabilities.ICapabilitySerializable<net.minecraft.nbt.CompoundTag>,net.minecraftforge.common.extensions.IForgeBlockEntity,net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
net.minecraftforge.common.capabilities.CapabilityProvider.AsField<B extends net.minecraftforge.common.capabilities.ICapabilityProviderImpl<B>> -
Field Summary
FieldsFields inherited from class com.codinglitch.simpleradio.core.registry.blocks.CatalyzingBlockEntity
catalyst, catalyzedFields 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.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB -
Constructor Summary
ConstructorsConstructorDescriptionReceiverBlockEntity(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.net.minecraft.core.BlockPosintGet the current cached antenna power.voidload(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, ReceiverBlockEntity blockEntity) Methods inherited from class com.codinglitch.simpleradio.core.registry.blocks.CatalyzingBlockEntity
tick, trySwapCatalystMethods inherited from class com.codinglitch.simpleradio.central.AuditoryBlockEntity
getConnectionPosition, getRouter, getUpdatePacket, getUpdateTag, loadFromItem, setLevel, validateMethods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, loadStatic, onChunkUnloaded, onlyOpCanSetNbt, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, triggerEventMethods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCapsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.codinglitch.simpleradio.central.Frequencing
appendTooltip, calculateAntennaPower, getAntennaBase, getDefaultFrequency, getDefaultModulation, getFrequency, getFrequency, setFrequency, setFrequency, setFrequency, tick, validateLocation, validateLocationMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapabilityMethods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
deserializeNBT, getModelData, getRenderBoundingBox, handleUpdateTag, hasCustomOutlineRendering, onDataPacket, onLoad, requestModelDataUpdate, serializeNBTMethods inherited from interface com.codinglitch.simpleradio.central.Receiving
startReceiving, startReceiving, startReceiving, startReceiving, startReceiving, startReceiving, stopReceivingMethods inherited from interface com.codinglitch.simpleradio.central.Socket
canConnect, canConnectTo, connect, disconnect, disconnect, distribute, getIdentifier, getReference, getWires, hasWire, hasWire, shortCircuit
-
Field Details
-
isDirty
public boolean isDirty -
antennaPower
public int antennaPower
-
-
Constructor Details
-
ReceiverBlockEntity
public ReceiverBlockEntity(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 classAuditoryBlockEntity
-
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, ReceiverBlockEntity 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
-
getAntennaPower
public int getAntennaPower()Description copied from interface:FrequencingGet the current cached antenna power. Only works if the instance has overridden this method. Use this method instead ofFrequencing.calculateAntennaPower(BlockPos, Level)whenever possible.- Specified by:
getAntennaPowerin interfaceFrequencing- Returns:
- The antenna power
-