PaperMC/paper-server/nms-patches/net/minecraft/world/level/GameRules.patch
CraftBukkit/Spigot 9da047989c Repackage NMS
By: md_5 <git@md-5.net>
2021-03-16 09:00:00 +11:00

58 lines
2.3 KiB
Diff

--- a/net/minecraft/world/level/GameRules.java
+++ b/net/minecraft/world/level/GameRules.java
@@ -113,7 +113,7 @@
}
public <T extends GameRules.GameRuleValue<T>> T get(GameRules.GameRuleKey<T> gamerules_gamerulekey) {
- return (GameRules.GameRuleValue) this.J.get(gamerules_gamerulekey);
+ return (T) this.J.get(gamerules_gamerulekey); // CraftBukkit - decompile error
}
public NBTTagCompound a() {
@@ -144,8 +144,8 @@
}
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_gameruledefinition.a(gamerules_gamerulevisitor, gamerules_gamerulekey);
+ gamerules_gamerulevisitor.a((GameRules.GameRuleKey<T>) gamerules_gamerulekey, (GameRules.GameRuleDefinition<T>) gamerules_gameruledefinition); // CraftBukkit - decompile error
+ ((GameRules.GameRuleDefinition<T>) gamerules_gameruledefinition).a(gamerules_gamerulevisitor, (GameRules.GameRuleKey<T>) gamerules_gamerulekey); // CraftBukkit - decompile error
}
public boolean getBoolean(GameRules.GameRuleKey<GameRules.GameRuleBoolean> gamerules_gamerulekey) {
@@ -196,7 +196,7 @@
}
@Override
- protected void setValue(String s) {
+ public void setValue(String s) { // PAIL - protected->public
this.b = Boolean.parseBoolean(s);
}
@@ -251,7 +251,7 @@
}
@Override
- protected void setValue(String s) {
+ public void setValue(String s) { // PAIL - protected->public
this.b = c(s);
}
@@ -305,7 +305,7 @@
}
- protected abstract void setValue(String s);
+ public abstract void setValue(String s); // PAIL - private->public
public abstract String getValue();
@@ -339,7 +339,7 @@
}
public T getValue() {
- return (GameRules.GameRuleValue) this.b.apply(this);
+ return this.b.apply(this); // CraftBukkit - decompile error
}
public void a(GameRules.GameRuleVisitor gamerules_gamerulevisitor, GameRules.GameRuleKey<T> gamerules_gamerulekey) {