Interface FabricGameRuleVisitor
- All Superinterfaces:
GameRules.Visitor
An extended game rule visitor which supports Fabric's own rule types.
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.
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
visitDouble
(GameRules.Key<DoubleRule> key, GameRules.Type<DoubleRule> type) Visit a double rule.default <E extends Enum<E>>
voidvisitEnum
(GameRules.Key<EnumRule<E>> key, GameRules.Type<EnumRule<E>> type) Visit an enum rule.Methods inherited from interface net.minecraft.world.GameRules.Visitor
visit, visitBoolean, visitInt
-
Method Details
-
visitDouble
Visit a double rule.Note
GameRules.Visitor.visit(GameRules.Key, GameRules.Type)
will be called before this method is visited.- Parameters:
key
- the rule keytype
- the rule type
-
visitEnum
default <E extends Enum<E>> void visitEnum(GameRules.Key<EnumRule<E>> key, GameRules.Type<EnumRule<E>> type) Visit an enum rule.Note
GameRules.Visitor.visit(GameRules.Key, GameRules.Type)
will be called before this method is visited.- Parameters:
key
- the rule keytype
- the rule type
-