Package net.minecraft.world
Class GameRules.Type<T extends GameRules.Rule<T>>
java.lang.Object
net.minecraft.world.GameRules.Type<T>
- Enclosing class:
- GameRules
public static class GameRules.Type<T extends GameRules.Rule<T>> extends Object
-
Field Summary
Fields Modifier and Type Field Description private Supplier<com.mojang.brigadier.arguments.ArgumentType<?>>
argumentType
private BiConsumer<MinecraftServer,T>
changeCallback
private GameRules.Acceptor<T>
ruleAcceptor
private Function<GameRules.Type<T>,T>
ruleFactory
-
Constructor Summary
Constructors Modifier Constructor Description private
Type(Supplier<com.mojang.brigadier.arguments.ArgumentType<?>> argumentType, Function<GameRules.Type<T>,T> ruleFactory, BiConsumer<MinecraftServer,T> changeCallback, GameRules.Acceptor<T> ruleAcceptor)
-
Method Summary
Modifier and Type Method Description void
accept(GameRules.Visitor consumer, GameRules.Key<T> key)
com.mojang.brigadier.builder.RequiredArgumentBuilder<ServerCommandSource,?>
argument(String name)
T
createRule()
-
Field Details
-
argumentType
-
ruleFactory
private final Function<GameRules.Type<T extends GameRules.Rule<T>>,T extends GameRules.Rule<T>> ruleFactory -
changeCallback
-
ruleAcceptor
-
-
Constructor Details
-
Type
private Type(Supplier<com.mojang.brigadier.arguments.ArgumentType<?>> argumentType, Function<GameRules.Type<T>,T> ruleFactory, BiConsumer<MinecraftServer,T> changeCallback, GameRules.Acceptor<T> ruleAcceptor)
-
-
Method Details
-
argument
public com.mojang.brigadier.builder.RequiredArgumentBuilder<ServerCommandSource,?> argument(String name) -
createRule
-
accept
-