Don't assume that entries exist for SafeNBTCopy
This commit is contained in:
@@ -52,7 +52,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ public SafeNBTCopy(NBTTagCompound base, String... keys) {
|
+ public SafeNBTCopy(NBTTagCompound base, String... keys) {
|
||||||
+ for (String key : keys) {
|
+ for (String key : keys) {
|
||||||
+ this.keys.add(key);
|
+ this.keys.add(key);
|
||||||
+ this.set(key, base.get(key));
|
+ final NBTBase nbtBase = base.get(key);
|
||||||
|
+ if (nbtBase != null) {
|
||||||
|
+ this.set(key, nbtBase);
|
||||||
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
|||||||
Reference in New Issue
Block a user