Interface Frequencing

All Known Subinterfaces:
Receiving, Transmitting
All Known Implementing Classes:
MicrophoneBlockEntity, MicrophoneItem, RadioBlockEntity, RadioItem, SpeakerBlockEntity, SpeakerItem, TransceiverItem, WalkieTalkieItem

public interface Frequencing
  • 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.
    • setFrequency

      default void setFrequency(net.minecraft.world.level.block.entity.BlockEntity blockEntity, String frequencyName, Frequency.Modulation modulation)
      Sets the frequency for a BlockEntity.
      Parameters:
      blockEntity - the BlockEntity to change the frequency of
      frequencyName - the frequency to set it to
      modulation - the modulation type of the frequency
    • setFrequency

      default void setFrequency(net.minecraft.world.level.block.entity.BlockEntity blockEntity, Frequency frequency)
      Sets the frequency for a BlockEntity.
      Parameters:
      blockEntity - the BlockEntity to change the frequency of
      frequency - the frequency to set it to
    • getFrequency

      default Frequency getFrequency(net.minecraft.world.item.ItemStack stack)
      Gets the frequency for an ItemStack.
      Parameters:
      stack - the ItemStack to get the frequency of
      Returns:
      The frequency, or null if it doesn't have one.
    • getFrequency

      default Frequency getFrequency(net.minecraft.world.level.block.entity.BlockEntity blockEntity)
      Gets the frequency for a BlockEntity.
      Parameters:
      blockEntity - the BlockEntity to get the frequency of
      Returns:
      The frequency, or null if it doesn't have one.
    • getDefaultFrequency

      default String getDefaultFrequency()
    • getDefaultModulation

      default Frequency.Modulation getDefaultModulation()
    • 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)
    • tick

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

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