3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-21 05:50:05 +01:00
Paper/nms-patches/GameRules.patch

59 Zeilen
2.3 KiB
Diff

2019-06-21 12:35:22 +02:00
--- a/net/minecraft/server/GameRules.java
+++ b/net/minecraft/server/GameRules.java
2020-06-25 02:00:00 +02:00
@@ -106,7 +106,7 @@
2019-06-21 12:35:22 +02:00
}
public <T extends GameRules.GameRuleValue<T>> T get(GameRules.GameRuleKey<T> gamerules_gamerulekey) {
2020-06-25 02:00:00 +02:00
- return (GameRules.GameRuleValue) this.J.get(gamerules_gamerulekey);
+ return (T) this.J.get(gamerules_gamerulekey); // CraftBukkit - decompile error
2019-06-21 12:35:22 +02:00
}
public NBTTagCompound a() {
2020-06-25 02:00:00 +02:00
@@ -137,8 +137,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
}
public boolean getBoolean(GameRules.GameRuleKey<GameRules.GameRuleBoolean> gamerules_gamerulekey) {
2020-06-25 02:00:00 +02:00
@@ -189,7 +189,7 @@
2019-06-21 12:35:22 +02:00
}
@Override
- protected void setValue(String s) {
2020-06-25 02:00:00 +02:00
+ public void setValue(String s) { // PAIL - protected->public
this.b = Boolean.parseBoolean(s);
2019-06-21 12:35:22 +02:00
}
2020-06-25 02:00:00 +02:00
@@ -244,7 +244,7 @@
2019-06-21 12:35:22 +02:00
}
@Override
- protected void setValue(String s) {
2020-06-25 02:00:00 +02:00
+ public void setValue(String s) { // PAIL - protected->public
this.b = c(s);
2019-06-21 12:35:22 +02:00
}
2020-06-25 02:00:00 +02:00
@@ -298,7 +298,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
2020-06-25 02:00:00 +02:00
@@ -332,7 +332,7 @@
2019-06-21 12:35:22 +02:00
}
2019-07-20 01:00:00 +02:00
public T getValue() {
2019-06-21 12:35:22 +02:00
- return (GameRules.GameRuleValue) this.b.apply(this);
+ return this.b.apply(this); // CraftBukkit - decompile error
}
2020-06-25 02:00:00 +02:00
public void a(GameRules.GameRuleVisitor gamerules_gamerulevisitor, GameRules.GameRuleKey<T> gamerules_gamerulekey) {