SPIGOT-4347: Add API to allow storing arbitrary values on ItemStacks

By: Bjarne Koll <LynxPlay101@gmail.com>
This commit is contained in:
CraftBukkit/Spigot
2018-12-01 20:26:23 +11:00
parent 7124aea9c6
commit b69f1de549
7 changed files with 818 additions and 1 deletions

View File

@@ -0,0 +1,20 @@
--- a/net/minecraft/server/MojangsonParser.java
+++ b/net/minecraft/server/MojangsonParser.java
@@ -82,7 +82,7 @@
}
}
- private NBTBase b(String s) {
+ public NBTBase b(String s) { // PAIL
try {
if (MojangsonParser.i.matcher(s).matches()) {
return new NBTTagFloat(Float.parseFloat(s.substring(0, s.length() - 1)));
@@ -207,7 +207,7 @@
}
}
- private NBTBase h() throws CommandSyntaxException {
+ public NBTBase h() throws CommandSyntaxException { // PAIL
this.a('[');
int i = this.n.getCursor();
char c0 = this.n.read();