Interface Receiving

All Known Implementing Classes:
RadioBlockEntity, RadioItem, TransceiverItem

public interface Receiving
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Random
     
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    appendTooltip(net.minecraft.world.item.ItemStack stack, List<net.minecraft.network.chat.Component> components)
     
    default RadioChannel
    listen(String frequencyName, Frequency.Modulation modulation, UUID owner)
    Start listening in a certain frequency.
    default net.minecraft.nbt.CompoundTag
    setFrequency(net.minecraft.world.item.ItemStack stack, String frequencyName, Frequency.Modulation modulation)
    Sets the frequency for an ItemStack.
    default void
    stopListening(String frequencyName, Frequency.Modulation modulation, UUID owner)
    Stop listening in a certain frequency
    default void
    tick(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level level, net.minecraft.world.entity.Entity entity)
     
    default boolean
    validate(Frequency frequency, UUID owner)
     
    default boolean
    validate(String frequency, Frequency.Modulation modulation, UUID owner)
    Validates whether a UUID is present in the frequency.
  • Field Details

    • RANDOM

      static final Random RANDOM
  • Method Details

    • setFrequency

      default net.minecraft.nbt.CompoundTag setFrequency(net.minecraft.world.item.ItemStack stack, String frequencyName, Frequency.Modulation modulation)
      Sets the frequency for an ItemStack.
      Parameters:
      stack - the ItemStack to change the frequency of
      frequencyName - the frequency to set it to
      modulation - the modulation type of the frequency
      Returns:
      The updated tag.
    • validate

      default boolean validate(String frequency, Frequency.Modulation modulation, UUID owner)
      Validates whether a UUID is present in the frequency.
      Parameters:
      frequency - the frequency to check
      modulation - the modulation type of the frequency
      owner - the UUID to validate
      Returns:
      Whether it is present in the frequency.
    • validate

      default boolean validate(Frequency frequency, UUID owner)
    • listen

      default RadioChannel listen(String frequencyName, Frequency.Modulation modulation, UUID owner)
      Start listening in a certain frequency.
      Parameters:
      frequencyName - the frequency to listen to
      modulation - the modulation type of the frequency
      owner - the UUID that will listen
      Returns:
      The channel created from the listener.
    • stopListening

      default void stopListening(String frequencyName, Frequency.Modulation modulation, UUID owner)
      Stop listening in a certain frequency
      Parameters:
      frequencyName - the frequency to stop listening to
      modulation - the modulation type of the frequency
      owner - the UUID to remove
    • tick

      default void tick(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level level, net.minecraft.world.entity.Entity entity)
    • appendTooltip

      default void appendTooltip(net.minecraft.world.item.ItemStack stack, List<net.minecraft.network.chat.Component> components)