Paper/nms-patches/GameRules.patch

57 lines
1.9 KiB
Diff
Raw Normal View History

2019-06-21 12:35:22 +02:00
--- a/net/minecraft/server/GameRules.java
+++ b/net/minecraft/server/GameRules.java
2020-01-21 22:00:00 +01:00
@@ -94,7 +94,7 @@
2019-06-21 12:35:22 +02:00
}
public <T extends GameRules.GameRuleValue<T>> T get(GameRules.GameRuleKey<T> gamerules_gamerulekey) {
2020-01-21 22:00:00 +01:00
- return (GameRules.GameRuleValue) this.H.get(gamerules_gamerulekey);
+ return (T) this.H.get(gamerules_gamerulekey); // CraftBukkit - decompile error
2019-06-21 12:35:22 +02:00
}
public NBTTagCompound a() {
2020-01-21 22:00:00 +01:00
@@ -122,7 +122,7 @@
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);
+ gamerules_gamerulevisitor.a((GameRules.GameRuleKey<T>) gamerules_gamerulekey, (GameRules.GameRuleDefinition<T>) gamerules_gameruledefinition); // CraftBukkit - decompile error
}
public boolean getBoolean(GameRules.GameRuleKey<GameRules.GameRuleBoolean> gamerules_gamerulekey) {
2020-01-21 22:00:00 +01:00
@@ -173,7 +173,7 @@
2019-06-21 12:35:22 +02:00
}
@Override
- protected void setValue(String s) {
+ public void setValue(String s) { // PAIL - private->public
this.a = Boolean.parseBoolean(s);
}
2020-01-21 22:00:00 +01:00
@@ -223,7 +223,7 @@
2019-06-21 12:35:22 +02:00
}
@Override
- protected void setValue(String s) {
+ public void setValue(String s) { // PAIL - private->public
this.a = b(s);
}
2020-01-21 22:00:00 +01:00
@@ -272,7 +272,7 @@
2019-06-21 12:35:22 +02:00
}
- protected abstract void setValue(String s);
+ public abstract void setValue(String s); // PAIL - private->public
protected abstract String getValue();
2020-01-21 22:00:00 +01:00
@@ -302,7 +302,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
}
}