Class RadioBlockEntity

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.RadioBlockEntity
All Implemented Interfaces:
Auricular, Frequencing, Receiving, Socket, Speaking, Animatable, 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>

public class RadioBlockEntity extends AuditoryBlockEntity implements Receiving, Speaking, Animatable
  • Field Details

    • 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 AuditoryBlockEntity
    • 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)
    • deactivate

      public void deactivate()
      Description copied from class: AuditoryBlockEntity
      This 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:
      deactivate in class AuditoryBlockEntity
    • activate

      public void activate()
      Description copied from class: AuditoryBlockEntity
      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.
      Overrides:
      activate in class AuditoryBlockEntity
    • getAntennaPower

      public int getAntennaPower()
      Description copied from interface: Frequencing
      Get the current cached antenna power. Only works if the instance has overridden this method. Use this method instead of Frequencing.calculateAntennaPower(BlockPos, Level) whenever possible.
      Specified by:
      getAntennaPower in interface Frequencing
      Returns:
      The antenna power
    • getWires

      public List<Wiring> getWires()
      Specified by:
      getWires in interface Socket