2021-03-15 23:00:00 +01:00
|
|
|
--- a/net/minecraft/world/level/GameRules.java
|
|
|
|
+++ b/net/minecraft/world/level/GameRules.java
|
2021-06-11 07:00:00 +02:00
|
|
|
@@ -118,7 +118,7 @@
|
2019-06-21 12:35:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public <T extends GameRules.GameRuleValue<T>> T get(GameRules.GameRuleKey<T> gamerules_gamerulekey) {
|
2021-06-11 07:00:00 +02:00
|
|
|
- return (GameRules.GameRuleValue) this.rules.get(gamerules_gamerulekey);
|
|
|
|
+ return (T) this.rules.get(gamerules_gamerulekey); // CraftBukkit - decompile error
|
2019-06-21 12:35:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public NBTTagCompound a() {
|
2021-06-11 07:00:00 +02:00
|
|
|
@@ -132,7 +132,7 @@
|
|
|
|
|
|
|
|
private void a(DynamicLike<?> dynamiclike) {
|
|
|
|
this.rules.forEach((gamerules_gamerulekey, gamerules_gamerulevalue) -> {
|
|
|
|
- Optional optional = dynamiclike.get(gamerules_gamerulekey.id).asString().result();
|
|
|
|
+ Optional<String> optional = dynamiclike.get(gamerules_gamerulekey.id).asString().result(); // CraftBukkit - decompile error
|
|
|
|
|
|
|
|
Objects.requireNonNull(gamerules_gamerulevalue);
|
|
|
|
optional.ifPresent(gamerules_gamerulevalue::setValue);
|
|
|
|
@@ -152,8 +152,8 @@
|
2019-06-21 12:35:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
private static <T extends GameRules.GameRuleValue<T>> void a(GameRules.GameRuleVisitor gamerules_gamerulevisitor, GameRules.GameRuleKey<?> gamerules_gamerulekey, GameRules.GameRuleDefinition<?> gamerules_gameruledefinition) {
|
|
|
|
- gamerules_gamerulevisitor.a(gamerules_gamerulekey, gamerules_gameruledefinition);
|
2020-06-25 02:00:00 +02:00
|
|
|
- gamerules_gameruledefinition.a(gamerules_gamerulevisitor, gamerules_gamerulekey);
|
2019-06-21 12:35:22 +02:00
|
|
|
+ gamerules_gamerulevisitor.a((GameRules.GameRuleKey<T>) gamerules_gamerulekey, (GameRules.GameRuleDefinition<T>) gamerules_gameruledefinition); // CraftBukkit - decompile error
|
2020-06-25 02:00:00 +02:00
|
|
|
+ ((GameRules.GameRuleDefinition<T>) gamerules_gameruledefinition).a(gamerules_gamerulevisitor, (GameRules.GameRuleKey<T>) gamerules_gamerulekey); // CraftBukkit - decompile error
|
2019-06-21 12:35:22 +02:00
|
|
|
}
|
|
|
|
|
2021-06-11 07:00:00 +02:00
|
|
|
public void a(GameRules gamerules, @Nullable MinecraftServer minecraftserver) {
|
|
|
|
@@ -245,7 +245,7 @@
|
2019-06-21 12:35:22 +02:00
|
|
|
}
|
|
|
|
|
2021-06-11 07:00:00 +02:00
|
|
|
public T getValue() {
|
|
|
|
- return (GameRules.GameRuleValue) this.constructor.apply(this);
|
|
|
|
+ return this.constructor.apply(this); // CraftBukkit - decompile error
|
2019-06-21 12:35:22 +02:00
|
|
|
}
|
|
|
|
|
2021-06-11 07:00:00 +02:00
|
|
|
public void a(GameRules.GameRuleVisitor gamerules_gamerulevisitor, GameRules.GameRuleKey<T> gamerules_gamerulekey) {
|
|
|
|
@@ -275,7 +275,7 @@
|
2019-06-21 12:35:22 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
- protected abstract void setValue(String s);
|
|
|
|
+ public abstract void setValue(String s); // PAIL - private->public
|
|
|
|
|
2020-06-25 02:00:00 +02:00
|
|
|
public abstract String getValue();
|
2019-06-21 12:35:22 +02:00
|
|
|
|
2021-06-11 07:00:00 +02:00
|
|
|
@@ -341,7 +341,7 @@
|
2019-06-21 12:35:22 +02:00
|
|
|
}
|
|
|
|
|
2021-06-11 07:00:00 +02:00
|
|
|
@Override
|
|
|
|
- protected void setValue(String s) {
|
|
|
|
+ public void setValue(String s) { // PAIL - protected->public
|
|
|
|
this.value = Boolean.parseBoolean(s);
|
|
|
|
}
|
|
|
|
|
|
|
|
@@ -406,7 +406,7 @@
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
- protected void setValue(String s) {
|
|
|
|
+ public void setValue(String s) { // PAIL - protected->public
|
|
|
|
this.value = c(s);
|
2019-06-21 12:35:22 +02:00
|
|
|
}
|
|
|
|
|