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 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

      public Map<Integer,AnimationInstance> getStates()
      Specified by:
      getStates in interface Animatable
    • getTime

      public float getTime()
      Specified by:
      getTime in interface Animatable
    • setTime

      public void setTime(float time)
      Specified by:
      setTime in interface Animatable
    • setRemoved

      public void setRemoved()
      Overrides:
      setRemoved in class net.minecraft.world.level.block.entity.BlockEntity
    • loadTag

      public void loadTag(net.minecraft.nbt.CompoundTag tag)
      Overrides:
      loadTag in class AuditoryBlockEntity
    • load

      public void load(net.minecraft.nbt.CompoundTag tag)
      Overrides:
      load in class net.minecraft.world.level.block.entity.BlockEntity
    • saveAdditional

      public void saveAdditional(net.minecraft.nbt.CompoundTag tag)
      Overrides:
      saveAdditional in class AuditoryBlockEntity
    • saveToItem

      public void saveToItem(net.minecraft.world.item.ItemStack stack)
      Overrides:
      saveToItem in class net.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: Frequencing
      Get the current cached antenna power. Only works if the instance has overriden this method. Use this method instead of Frequencing.calculateAntennaPower(BlockPos, Level) whenever possible.
      Specified by:
      getAntennaPower in interface Frequencing
      Returns:
      The antenna power