public interface FabricGameRuleVisitor
extends net.minecraft.world.GameRules.Visitor
Game rule visitors are typically used iterating all game rules.
In vanilla, the visitor is used to register game rule commands and populate the Edit Game Rules
screen.
Rule types specified by this interface are not exhaustive. New entries may be added in the future.
Modifier and Type | Method and Description |
---|---|
default void |
visitDouble(net.minecraft.world.GameRules.Key<DoubleRule> key,
net.minecraft.world.GameRules.Type<DoubleRule> type)
Visit a double rule.
|
default <E extends Enum<E>> |
visitEnum(net.minecraft.world.GameRules.Key<EnumRule<E>> key,
net.minecraft.world.GameRules.Type<EnumRule<E>> type)
Visit an enum rule.
|
default void visitDouble(net.minecraft.world.GameRules.Key<DoubleRule> key, net.minecraft.world.GameRules.Type<DoubleRule> type)
Note GameRules.Visitor.visit(GameRules.Key, GameRules.Type)
will be called before this method is visited.
key
- the rule keytype
- the rule typedefault <E extends Enum<E>> void visitEnum(net.minecraft.world.GameRules.Key<EnumRule<E>> key, net.minecraft.world.GameRules.Type<EnumRule<E>> type)
Note GameRules.Visitor.visit(GameRules.Key, GameRules.Type)
will be called before this method is visited.
key
- the rule keytype
- the rule type