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

This commit is contained in:
Bjarne Koll
2018-12-01 20:26:23 +11:00
committed by md_5
parent a4c555b6b1
commit 38e4c013b6
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();