Package net.fabricmc.fabric.api.registry
Class SculkSensorFrequencyRegistry
java.lang.Object
net.fabricmc.fabric.api.registry.SculkSensorFrequencyRegistry
Provides a method for registering sculk sensor frequencies.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
register
(net.minecraft.world.event.GameEvent event, int frequency) Registers a sculk sensor frequency for the given game event.
-
Method Details
-
register
public static void register(net.minecraft.world.event.GameEvent event, int frequency) Registers a sculk sensor frequency for the given game event.A frequency is defined as the redstone signal strength a sculk sensor will emit to a comparator when it detects a specific vibration.
As redstone signal strengths are limited to a maximum of 15, a frequency must also be between 1 and 15. As such, many game events will share a single frequency.
Note that the game event must also be in the GameEventTags.VIBRATIONS tag to be detected by sculk sensors in the first place.
- Parameters:
event
- The event to register the frequency for.frequency
- The frequency to register.- Throws:
IllegalArgumentException
- if the given frequency is not within the allowed range.
-