public static class GameRules.Type<T extends GameRules.Rule<T>> extends Object
Modifier and Type | Field and 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 |
Modifier | Constructor and Description |
---|---|
private |
Type(Supplier<com.mojang.brigadier.arguments.ArgumentType<?>> argumentType,
Function<GameRules.Type<T>,T> ruleFactory,
BiConsumer<MinecraftServer,T> changeCallback,
GameRules.Acceptor<T> ruleAcceptor) |
Modifier and Type | Method and Description |
---|---|
void |
accept(GameRules.Visitor consumer,
GameRules.Key<T> key) |
com.mojang.brigadier.builder.RequiredArgumentBuilder<ServerCommandSource,?> |
argument(String name) |
T |
createRule() |
private final Supplier<com.mojang.brigadier.arguments.ArgumentType<?>> argumentType
private final Function<GameRules.Type<T extends GameRules.Rule<T>>,T extends GameRules.Rule<T>> ruleFactory
private final BiConsumer<MinecraftServer,T extends GameRules.Rule<T>> changeCallback
private final GameRules.Acceptor<T extends GameRules.Rule<T>> ruleAcceptor
private Type(Supplier<com.mojang.brigadier.arguments.ArgumentType<?>> argumentType, Function<GameRules.Type<T>,T> ruleFactory, BiConsumer<MinecraftServer,T> changeCallback, GameRules.Acceptor<T> ruleAcceptor)
public com.mojang.brigadier.builder.RequiredArgumentBuilder<ServerCommandSource,?> argument(String name)
public T createRule()
public void accept(GameRules.Visitor consumer, GameRules.Key<T> key)