Class RegisterGameRuleEntryFactoryEvent

java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.gamerules.RegisterGameRuleEntryFactoryEvent
All Implemented Interfaces:
IModBusEvent

public final class RegisterGameRuleEntryFactoryEvent extends net.neoforged.bus.api.Event implements IModBusEvent
Fired to allow modders to register custom EditGameRulesScreen.RuleEntry factories.

This event is fired on the mod-specific event bus, only on the logical client.

While you are not required to register a custom factory for your GameRuleType, it is recommended to do so if your game rule requires more than a simple EditBox. For example a togglable type similar to Boolean would register a new factory which makes use of a CycleButton insead of a EditBox.

When no factory exists for a given type the generic entry will be used instead.