Interface Frequencing
- All Known Subinterfaces:
Receiving,Transmitting
- All Known Implementing Classes:
MicrophoneBlockEntity,MicrophoneItem,RadioBlockEntity,RadioItem,SpeakerBlockEntity,SpeakerItem,TransceiverItem,WalkieTalkieItem
public interface Frequencing
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidappendTooltip(net.minecraft.world.item.ItemStack stack, List<net.minecraft.network.chat.Component> components) default Stringdefault Frequency.Modulationdefault FrequencygetFrequency(net.minecraft.world.item.ItemStack stack) Gets the frequency for an ItemStack.default FrequencygetFrequency(net.minecraft.world.level.block.entity.BlockEntity blockEntity) Gets the frequency for a BlockEntity.default net.minecraft.nbt.CompoundTagsetFrequency(net.minecraft.world.item.ItemStack stack, String frequencyName, Frequency.Modulation modulation) Sets the frequency for an ItemStack.default voidsetFrequency(net.minecraft.world.level.block.entity.BlockEntity blockEntity, Frequency frequency) Sets the frequency for a BlockEntity.default voidsetFrequency(net.minecraft.world.level.block.entity.BlockEntity blockEntity, String frequencyName, Frequency.Modulation modulation) Sets the frequency for a BlockEntity.default voidtick(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level level) default booleandefault booleanvalidate(String frequency, Frequency.Modulation modulation, UUID owner) Validates whether a UUID is present in the frequency.
-
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 offrequencyName- the frequency to set it tomodulation- 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 offrequencyName- the frequency to set it tomodulation- 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 offrequency- the frequency to set it to
-
getFrequency
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
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
-
getDefaultModulation
-
validate
Validates whether a UUID is present in the frequency.- Parameters:
frequency- the frequency to checkmodulation- the modulation type of the frequencyowner- the UUID to validate- Returns:
- Whether it is present in the frequency.
-
validate
-
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)
-