diff options
Diffstat (limited to 'patch-remap/mache-spigotflower/net/minecraft/world/level/GameRules.java.patch')
-rw-r--r-- | patch-remap/mache-spigotflower/net/minecraft/world/level/GameRules.java.patch | 512 |
1 files changed, 512 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower/net/minecraft/world/level/GameRules.java.patch b/patch-remap/mache-spigotflower/net/minecraft/world/level/GameRules.java.patch new file mode 100644 index 0000000000..ea1edeab1f --- /dev/null +++ b/patch-remap/mache-spigotflower/net/minecraft/world/level/GameRules.java.patch @@ -0,0 +1,512 @@ +--- a/net/minecraft/world/level/GameRules.java ++++ b/net/minecraft/world/level/GameRules.java +@@ -32,8 +32,8 @@ + + public static final int DEFAULT_RANDOM_TICK_SPEED = 3; + static final Logger LOGGER = LogUtils.getLogger(); +- private static final Map<GameRules.Key<?>, GameRules.Type<?>> GAME_RULE_TYPES = Maps.newTreeMap(Comparator.comparing((gamerules_key) -> { +- return gamerules_key.id; ++ private static final Map<GameRules.Key<?>, GameRules.Type<?>> GAME_RULE_TYPES = Maps.newTreeMap(Comparator.comparing((gamerules_gamerulekey) -> { ++ return gamerules_gamerulekey.id; + })); + public static final GameRules.Key<GameRules.BooleanValue> RULE_DOFIRETICK = register("doFireTick", GameRules.Category.UPDATES, GameRules.BooleanValue.create(true)); + public static final GameRules.Key<GameRules.BooleanValue> RULE_MOBGRIEFING = register("mobGriefing", GameRules.Category.MOBS, GameRules.BooleanValue.create(true)); +@@ -50,14 +50,14 @@ + public static final GameRules.Key<GameRules.BooleanValue> RULE_SHOWDEATHMESSAGES = register("showDeathMessages", GameRules.Category.CHAT, GameRules.BooleanValue.create(true)); + public static final GameRules.Key<GameRules.IntegerValue> RULE_RANDOMTICKING = register("randomTickSpeed", GameRules.Category.UPDATES, GameRules.IntegerValue.create(3)); + public static final GameRules.Key<GameRules.BooleanValue> RULE_SENDCOMMANDFEEDBACK = register("sendCommandFeedback", GameRules.Category.CHAT, GameRules.BooleanValue.create(true)); +- public static final GameRules.Key<GameRules.BooleanValue> RULE_REDUCEDDEBUGINFO = register("reducedDebugInfo", GameRules.Category.MISC, GameRules.BooleanValue.create(false, (minecraftserver, gamerules_booleanvalue) -> { +- int i = gamerules_booleanvalue.get() ? 22 : 23; ++ public static final GameRules.Key<GameRules.BooleanValue> RULE_REDUCEDDEBUGINFO = register("reducedDebugInfo", GameRules.Category.MISC, GameRules.BooleanValue.create(false, (minecraftserver, gamerules_gameruleboolean) -> { ++ int i = gamerules_gameruleboolean.get() ? 22 : 23; + Iterator iterator = minecraftserver.getPlayerList().getPlayers().iterator(); + + while (iterator.hasNext()) { +- ServerPlayer serverplayer = (ServerPlayer) iterator.next(); ++ ServerPlayer entityplayer = (ServerPlayer) iterator.next(); + +- serverplayer.connection.send(new ClientboundEntityEventPacket(serverplayer, (byte) i)); ++ entityplayer.connection.send(new ClientboundEntityEventPacket(entityplayer, (byte) i)); + } + + })); +@@ -66,13 +66,13 @@ + public static final GameRules.Key<GameRules.BooleanValue> RULE_DISABLE_ELYTRA_MOVEMENT_CHECK = register("disableElytraMovementCheck", GameRules.Category.PLAYER, GameRules.BooleanValue.create(false)); + public static final GameRules.Key<GameRules.IntegerValue> RULE_MAX_ENTITY_CRAMMING = register("maxEntityCramming", GameRules.Category.MOBS, GameRules.IntegerValue.create(24)); + public static final GameRules.Key<GameRules.BooleanValue> RULE_WEATHER_CYCLE = register("doWeatherCycle", GameRules.Category.UPDATES, GameRules.BooleanValue.create(true)); +- public static final GameRules.Key<GameRules.BooleanValue> RULE_LIMITED_CRAFTING = register("doLimitedCrafting", GameRules.Category.PLAYER, GameRules.BooleanValue.create(false, (minecraftserver, gamerules_booleanvalue) -> { ++ public static final GameRules.Key<GameRules.BooleanValue> RULE_LIMITED_CRAFTING = register("doLimitedCrafting", GameRules.Category.PLAYER, GameRules.BooleanValue.create(false, (minecraftserver, gamerules_gameruleboolean) -> { + Iterator iterator = minecraftserver.getPlayerList().getPlayers().iterator(); + + while (iterator.hasNext()) { +- ServerPlayer serverplayer = (ServerPlayer) iterator.next(); ++ ServerPlayer entityplayer = (ServerPlayer) iterator.next(); + +- serverplayer.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.LIMITED_CRAFTING, gamerules_booleanvalue.get() ? 1.0F : 0.0F)); ++ entityplayer.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.LIMITED_CRAFTING, gamerules_gameruleboolean.get() ? 1.0F : 0.0F)); + } + + })); +@@ -82,13 +82,13 @@ + public static final GameRules.Key<GameRules.BooleanValue> RULE_ANNOUNCE_ADVANCEMENTS = register("announceAdvancements", GameRules.Category.CHAT, GameRules.BooleanValue.create(true)); + public static final GameRules.Key<GameRules.BooleanValue> RULE_DISABLE_RAIDS = register("disableRaids", GameRules.Category.MOBS, GameRules.BooleanValue.create(false)); + public static final GameRules.Key<GameRules.BooleanValue> RULE_DOINSOMNIA = register("doInsomnia", GameRules.Category.SPAWNING, GameRules.BooleanValue.create(true)); +- public static final GameRules.Key<GameRules.BooleanValue> RULE_DO_IMMEDIATE_RESPAWN = register("doImmediateRespawn", GameRules.Category.PLAYER, GameRules.BooleanValue.create(false, (minecraftserver, gamerules_booleanvalue) -> { ++ public static final GameRules.Key<GameRules.BooleanValue> RULE_DO_IMMEDIATE_RESPAWN = register("doImmediateRespawn", GameRules.Category.PLAYER, GameRules.BooleanValue.create(false, (minecraftserver, gamerules_gameruleboolean) -> { + Iterator iterator = minecraftserver.getPlayerList().getPlayers().iterator(); + + while (iterator.hasNext()) { +- ServerPlayer serverplayer = (ServerPlayer) iterator.next(); ++ ServerPlayer entityplayer = (ServerPlayer) iterator.next(); + +- serverplayer.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.IMMEDIATE_RESPAWN, gamerules_booleanvalue.get() ? 1.0F : 0.0F)); ++ entityplayer.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.IMMEDIATE_RESPAWN, gamerules_gameruleboolean.get() ? 1.0F : 0.0F)); + } + + })); +@@ -115,20 +115,20 @@ + public static final GameRules.Key<GameRules.BooleanValue> RULE_ENDER_PEARLS_VANISH_ON_DEATH = register("enderPearlsVanishOnDeath", GameRules.Category.PLAYER, GameRules.BooleanValue.create(true)); + private final Map<GameRules.Key<?>, GameRules.Value<?>> rules; + +- private static <T extends GameRules.Value<T>> GameRules.Key<T> register(String s, GameRules.Category gamerules_category, GameRules.Type<T> gamerules_type) { +- GameRules.Key<T> gamerules_key = new GameRules.Key<>(s, gamerules_category); +- GameRules.Type<?> gamerules_type1 = (GameRules.Type) GameRules.GAME_RULE_TYPES.put(gamerules_key, gamerules_type); ++ private static <T extends GameRules.Value<T>> GameRules.Key<T> register(String name, GameRules.Category category, GameRules.Type<T> type) { ++ GameRules.Key<T> gamerules_gamerulekey = new GameRules.Key<>(name, category); ++ GameRules.Type<?> gamerules_gameruledefinition1 = (GameRules.Type) GameRules.GAME_RULE_TYPES.put(gamerules_gamerulekey, type); + +- if (gamerules_type1 != null) { +- throw new IllegalStateException("Duplicate game rule registration for " + s); ++ if (gamerules_gameruledefinition1 != null) { ++ throw new IllegalStateException("Duplicate game rule registration for " + name); + } else { +- return gamerules_key; ++ return gamerules_gamerulekey; + } + } + +- public GameRules(DynamicLike<?> dynamiclike) { ++ public GameRules(DynamicLike<?> tag) { + this(); +- this.loadFromTag(dynamiclike); ++ this.loadFromTag(tag); + } + + public GameRules() { +@@ -137,29 +137,29 @@ + })); + } + +- private GameRules(Map<GameRules.Key<?>, GameRules.Value<?>> map) { +- this.rules = map; ++ private GameRules(Map<GameRules.Key<?>, GameRules.Value<?>> rules) { ++ this.rules = rules; + } + +- public <T extends GameRules.Value<T>> T getRule(GameRules.Key<T> gamerules_key) { +- return (GameRules.Value) this.rules.get(gamerules_key); ++ public <T extends GameRules.Value<T>> T getRule(GameRules.Key<T> key) { ++ return (T) this.rules.get(key); // CraftBukkit - decompile error + } + + public CompoundTag createTag() { +- CompoundTag compoundtag = new CompoundTag(); ++ CompoundTag nbttagcompound = new CompoundTag(); + +- this.rules.forEach((gamerules_key, gamerules_value) -> { +- compoundtag.putString(gamerules_key.id, gamerules_value.serialize()); ++ this.rules.forEach((gamerules_gamerulekey, gamerules_gamerulevalue) -> { ++ nbttagcompound.putString(gamerules_gamerulekey.id, gamerules_gamerulevalue.serialize()); + }); +- return compoundtag; ++ return nbttagcompound; + } + +- private void loadFromTag(DynamicLike<?> dynamiclike) { +- this.rules.forEach((gamerules_key, gamerules_value) -> { +- Optional optional = dynamiclike.get(gamerules_key.id).asString().result(); ++ private void loadFromTag(DynamicLike<?> dynamic) { ++ this.rules.forEach((gamerules_gamerulekey, gamerules_gamerulevalue) -> { ++ Optional<String> optional = dynamic.get(gamerules_gamerulekey.id).asString().result(); // CraftBukkit - decompile error + +- Objects.requireNonNull(gamerules_value); +- optional.ifPresent(gamerules_value::deserialize); ++ Objects.requireNonNull(gamerules_gamerulevalue); ++ optional.ifPresent(gamerules_gamerulevalue::deserialize); + }); + } + +@@ -169,35 +169,35 @@ + }))); + } + +- public static void visitGameRuleTypes(GameRules.GameRuleTypeVisitor gamerules_gameruletypevisitor) { +- GameRules.GAME_RULE_TYPES.forEach((gamerules_key, gamerules_type) -> { +- callVisitorCap(gamerules_gameruletypevisitor, gamerules_key, gamerules_type); ++ public static void visitGameRuleTypes(GameRules.GameRuleTypeVisitor visitor) { ++ GameRules.GAME_RULE_TYPES.forEach((gamerules_gamerulekey, gamerules_gameruledefinition) -> { ++ callVisitorCap(visitor, gamerules_gamerulekey, gamerules_gameruledefinition); + }); + } + +- private static <T extends GameRules.Value<T>> void callVisitorCap(GameRules.GameRuleTypeVisitor gamerules_gameruletypevisitor, GameRules.Key<?> gamerules_key, GameRules.Type<?> gamerules_type) { +- gamerules_gameruletypevisitor.visit(gamerules_key, gamerules_type); +- gamerules_type.callVisitor(gamerules_gameruletypevisitor, gamerules_key); ++ private static <T extends GameRules.Value<T>> void callVisitorCap(GameRules.GameRuleTypeVisitor visitor, GameRules.Key<?> key, GameRules.Type<?> type) { ++ visitor.visit((GameRules.Key<T>) key, (GameRules.Type<T>) type); // CraftBukkit - decompile error ++ ((GameRules.Type<T>) type).callVisitor(visitor, (GameRules.Key<T>) key); // CraftBukkit - decompile error + } + +- public void assignFrom(GameRules gamerules, @Nullable MinecraftServer minecraftserver) { +- gamerules.rules.keySet().forEach((gamerules_key) -> { +- this.assignCap(gamerules_key, gamerules, minecraftserver); ++ public void assignFrom(GameRules rules, @Nullable MinecraftServer server) { ++ rules.rules.keySet().forEach((gamerules_gamerulekey) -> { ++ this.assignCap(gamerules_gamerulekey, rules, server); + }); + } + +- private <T extends GameRules.Value<T>> void assignCap(GameRules.Key<T> gamerules_key, GameRules gamerules, @Nullable MinecraftServer minecraftserver) { +- T t0 = gamerules.getRule(gamerules_key); ++ private <T extends GameRules.Value<T>> void assignCap(GameRules.Key<T> key, GameRules rules, @Nullable MinecraftServer server) { ++ T t0 = rules.getRule(key); + +- this.getRule(gamerules_key).setFrom(t0, minecraftserver); ++ this.getRule(key).setFrom(t0, server); + } + +- public boolean getBoolean(GameRules.Key<GameRules.BooleanValue> gamerules_key) { +- return ((GameRules.BooleanValue) this.getRule(gamerules_key)).get(); ++ public boolean getBoolean(GameRules.Key<GameRules.BooleanValue> key) { ++ return ((GameRules.BooleanValue) this.getRule(key)).get(); + } + +- public int getInt(GameRules.Key<GameRules.IntegerValue> gamerules_key) { +- return ((GameRules.IntegerValue) this.getRule(gamerules_key)).get(); ++ public int getInt(GameRules.Key<GameRules.IntegerValue> key) { ++ return ((GameRules.IntegerValue) this.getRule(key)).get(); + } + + public static final class Key<T extends GameRules.Value<T>> { +@@ -205,22 +205,19 @@ + final String id; + private final GameRules.Category category; + +- public Key(String s, GameRules.Category gamerules_category) { +- this.id = s; +- this.category = gamerules_category; ++ public Key(String id, GameRules.Category category) { ++ this.id = id; ++ this.category = category; + } + +- @Override + public String toString() { + return this.id; + } + +- @Override + public boolean equals(Object object) { + return this == object ? true : object instanceof GameRules.Key && ((GameRules.Key) object).id.equals(this.id); + } + +- @Override + public int hashCode() { + return this.id.hashCode(); + } +@@ -260,23 +257,23 @@ + final BiConsumer<MinecraftServer, T> callback; + private final GameRules.VisitorCaller<T> visitorCaller; + +- Type(Supplier<ArgumentType<?>> supplier, Function<GameRules.Type<T>, T> function, BiConsumer<MinecraftServer, T> biconsumer, GameRules.VisitorCaller<T> gamerules_visitorcaller) { +- this.argument = supplier; +- this.constructor = function; +- this.callback = biconsumer; +- this.visitorCaller = gamerules_visitorcaller; ++ Type(Supplier<ArgumentType<?>> argument, Function<GameRules.Type<T>, T> constructor, BiConsumer<MinecraftServer, T> callback, GameRules.VisitorCaller<T> visitorCaller) { ++ this.argument = argument; ++ this.constructor = constructor; ++ this.callback = callback; ++ this.visitorCaller = visitorCaller; + } + +- public RequiredArgumentBuilder<CommandSourceStack, ?> createArgument(String s) { +- return Commands.argument(s, (ArgumentType) this.argument.get()); ++ public RequiredArgumentBuilder<CommandSourceStack, ?> createArgument(String name) { ++ return Commands.argument(name, (ArgumentType) this.argument.get()); + } + + public T createRule() { +- return (GameRules.Value) this.constructor.apply(this); ++ return this.constructor.apply(this); // CraftBukkit - decompile error + } + +- public void callVisitor(GameRules.GameRuleTypeVisitor gamerules_gameruletypevisitor, GameRules.Key<T> gamerules_key) { +- this.visitorCaller.call(gamerules_gameruletypevisitor, gamerules_key, this); ++ public void callVisitor(GameRules.GameRuleTypeVisitor visitor, GameRules.Key<T> key) { ++ this.visitorCaller.call(visitor, key, this); + } + } + +@@ -284,29 +281,28 @@ + + protected final GameRules.Type<T> type; + +- public Value(GameRules.Type<T> gamerules_type) { +- this.type = gamerules_type; ++ public Value(GameRules.Type<T> type) { ++ this.type = type; + } + + protected abstract void updateFromArgument(CommandContext<CommandSourceStack> context, String paramName); + +- public void setFromArgument(CommandContext<CommandSourceStack> commandcontext, String s) { +- this.updateFromArgument(commandcontext, s); +- this.onChanged(((CommandSourceStack) commandcontext.getSource()).getServer()); ++ public void setFromArgument(CommandContext<CommandSourceStack> context, String paramName) { ++ this.updateFromArgument(context, paramName); ++ this.onChanged(((CommandSourceStack) context.getSource()).getServer()); + } + +- protected void onChanged(@Nullable MinecraftServer minecraftserver) { +- if (minecraftserver != null) { +- this.type.callback.accept(minecraftserver, this.getSelf()); ++ public void onChanged(@Nullable MinecraftServer server) { ++ if (server != null) { ++ this.type.callback.accept(server, this.getSelf()); + } + + } + +- protected abstract void deserialize(String value); ++ public abstract void deserialize(String value); // PAIL - private->public + + public abstract String serialize(); + +- @Override + public String toString() { + return this.serialize(); + } +@@ -322,82 +318,75 @@ + + public interface GameRuleTypeVisitor { + +- default <T extends GameRules.Value<T>> void visit(GameRules.Key<T> gamerules_key, GameRules.Type<T> gamerules_type) {} ++ default <T extends GameRules.Value<T>> void visit(GameRules.Key<T> key, GameRules.Type<T> type) {} + +- default void visitBoolean(GameRules.Key<GameRules.BooleanValue> gamerules_key, GameRules.Type<GameRules.BooleanValue> gamerules_type) {} ++ default void visitBoolean(GameRules.Key<GameRules.BooleanValue> key, GameRules.Type<GameRules.BooleanValue> type) {} + +- default void visitInteger(GameRules.Key<GameRules.IntegerValue> gamerules_key, GameRules.Type<GameRules.IntegerValue> gamerules_type) {} ++ default void visitInteger(GameRules.Key<GameRules.IntegerValue> key, GameRules.Type<GameRules.IntegerValue> type) {} + } + + public static class BooleanValue extends GameRules.Value<GameRules.BooleanValue> { + + private boolean value; + +- static GameRules.Type<GameRules.BooleanValue> create(boolean flag, BiConsumer<MinecraftServer, GameRules.BooleanValue> biconsumer) { +- return new GameRules.Type<>(BoolArgumentType::bool, (gamerules_type) -> { +- return new GameRules.BooleanValue(gamerules_type, flag); +- }, biconsumer, GameRules.GameRuleTypeVisitor::visitBoolean); ++ static GameRules.Type<GameRules.BooleanValue> create(boolean defaultValue, BiConsumer<MinecraftServer, GameRules.BooleanValue> changeListener) { ++ return new GameRules.Type<>(BoolArgumentType::bool, (gamerules_gameruledefinition) -> { ++ return new GameRules.BooleanValue(gamerules_gameruledefinition, defaultValue); ++ }, changeListener, GameRules.GameRuleTypeVisitor::visitBoolean); + } + +- static GameRules.Type<GameRules.BooleanValue> create(boolean flag) { +- return create(flag, (minecraftserver, gamerules_booleanvalue) -> { ++ static GameRules.Type<GameRules.BooleanValue> create(boolean defaultValue) { ++ return create(defaultValue, (minecraftserver, gamerules_gameruleboolean) -> { + }); + } + +- public BooleanValue(GameRules.Type<GameRules.BooleanValue> gamerules_type, boolean flag) { +- super(gamerules_type); +- this.value = flag; ++ public BooleanValue(GameRules.Type<GameRules.BooleanValue> type, boolean value) { ++ super(type); ++ this.value = value; + } + + @Override +- @Override +- protected void updateFromArgument(CommandContext<CommandSourceStack> commandcontext, String s) { +- this.value = BoolArgumentType.getBool(commandcontext, s); ++ protected void updateFromArgument(CommandContext<CommandSourceStack> context, String paramName) { ++ this.value = BoolArgumentType.getBool(context, paramName); + } + + public boolean get() { + return this.value; + } + +- public void set(boolean flag, @Nullable MinecraftServer minecraftserver) { +- this.value = flag; +- this.onChanged(minecraftserver); ++ public void set(boolean value, @Nullable MinecraftServer server) { ++ this.value = value; ++ this.onChanged(server); + } + + @Override +- @Override + public String serialize() { + return Boolean.toString(this.value); + } + + @Override +- @Override +- protected void deserialize(String s) { +- this.value = Boolean.parseBoolean(s); ++ public void deserialize(String value) { // PAIL - protected->public ++ this.value = Boolean.parseBoolean(value); + } + + @Override +- @Override + public int getCommandResult() { + return this.value ? 1 : 0; + } + + @Override +- @Override + protected GameRules.BooleanValue getSelf() { + return this; + } + + @Override +- @Override + protected GameRules.BooleanValue copy() { + return new GameRules.BooleanValue(this.type, this.value); + } + +- @Override +- public void setFrom(GameRules.BooleanValue gamerules_booleanvalue, @Nullable MinecraftServer minecraftserver) { +- this.value = gamerules_booleanvalue.value; +- this.onChanged(minecraftserver); ++ public void setFrom(GameRules.BooleanValue value, @Nullable MinecraftServer server) { ++ this.value = value.value; ++ this.onChanged(server); + } + } + +@@ -405,64 +394,61 @@ + + private int value; + +- private static GameRules.Type<GameRules.IntegerValue> create(int i, BiConsumer<MinecraftServer, GameRules.IntegerValue> biconsumer) { +- return new GameRules.Type<>(IntegerArgumentType::integer, (gamerules_type) -> { +- return new GameRules.IntegerValue(gamerules_type, i); +- }, biconsumer, GameRules.GameRuleTypeVisitor::visitInteger); ++ private static GameRules.Type<GameRules.IntegerValue> create(int defaultValue, BiConsumer<MinecraftServer, GameRules.IntegerValue> changeListener) { ++ return new GameRules.Type<>(IntegerArgumentType::integer, (gamerules_gameruledefinition) -> { ++ return new GameRules.IntegerValue(gamerules_gameruledefinition, defaultValue); ++ }, changeListener, GameRules.GameRuleTypeVisitor::visitInteger); + } + +- static GameRules.Type<GameRules.IntegerValue> create(int i) { +- return create(i, (minecraftserver, gamerules_integervalue) -> { ++ static GameRules.Type<GameRules.IntegerValue> create(int defaultValue) { ++ return create(defaultValue, (minecraftserver, gamerules_gameruleint) -> { + }); + } + +- public IntegerValue(GameRules.Type<GameRules.IntegerValue> gamerules_type, int i) { +- super(gamerules_type); +- this.value = i; ++ public IntegerValue(GameRules.Type<GameRules.IntegerValue> type, int value) { ++ super(type); ++ this.value = value; + } + + @Override +- @Override +- protected void updateFromArgument(CommandContext<CommandSourceStack> commandcontext, String s) { +- this.value = IntegerArgumentType.getInteger(commandcontext, s); ++ protected void updateFromArgument(CommandContext<CommandSourceStack> context, String paramName) { ++ this.value = IntegerArgumentType.getInteger(context, paramName); + } + + public int get() { + return this.value; + } + +- public void set(int i, @Nullable MinecraftServer minecraftserver) { +- this.value = i; +- this.onChanged(minecraftserver); ++ public void set(int value, @Nullable MinecraftServer server) { ++ this.value = value; ++ this.onChanged(server); + } + + @Override +- @Override + public String serialize() { + return Integer.toString(this.value); + } + + @Override +- @Override +- protected void deserialize(String s) { +- this.value = safeParse(s); ++ public void deserialize(String value) { // PAIL - protected->public ++ this.value = safeParse(value); + } + +- public boolean tryDeserialize(String s) { ++ public boolean tryDeserialize(String name) { + try { +- this.value = Integer.parseInt(s); ++ this.value = Integer.parseInt(name); + return true; + } catch (NumberFormatException numberformatexception) { + return false; + } + } + +- private static int safeParse(String s) { +- if (!s.isEmpty()) { ++ private static int safeParse(String strValue) { ++ if (!strValue.isEmpty()) { + try { +- return Integer.parseInt(s); ++ return Integer.parseInt(strValue); + } catch (NumberFormatException numberformatexception) { +- GameRules.LOGGER.warn("Failed to parse integer {}", s); ++ GameRules.LOGGER.warn("Failed to parse integer {}", strValue); + } + } + +@@ -470,27 +456,23 @@ + } + + @Override +- @Override + public int getCommandResult() { + return this.value; + } + + @Override +- @Override + protected GameRules.IntegerValue getSelf() { + return this; + } + + @Override +- @Override + protected GameRules.IntegerValue copy() { + return new GameRules.IntegerValue(this.type, this.value); + } + +- @Override +- public void setFrom(GameRules.IntegerValue gamerules_integervalue, @Nullable MinecraftServer minecraftserver) { +- this.value = gamerules_integervalue.value; +- this.onChanged(minecraftserver); ++ public void setFrom(GameRules.IntegerValue value, @Nullable MinecraftServer server) { ++ this.value = value.value; ++ this.onChanged(server); + } + } + |