Spelling and a reflection freakout fix.
This commit is contained in:
parent
b4497f9b26
commit
822db7a308
@ -140,13 +140,16 @@ public class ItemStackAdapter implements JsonDeserializer<ItemStack>, JsonSerial
|
||||
}
|
||||
|
||||
// Create Non enchanted stack
|
||||
CraftItemStack stack = new CraftItemStack(type, amount, damage);
|
||||
ItemStack stack = new ItemStack(type, amount, damage);
|
||||
|
||||
// Add tag
|
||||
if (jsonItemStack.has(TAG))
|
||||
{
|
||||
JsonObject jsonbt = jsonItemStack.get(TAG).getAsJsonObject();
|
||||
CraftItemStack craftItemStack = stack;
|
||||
|
||||
CraftItemStack craftItemStack = new CraftItemStack(stack);
|
||||
stack = craftItemStack;
|
||||
|
||||
NBTBase nbt = NbtGsonConverter.gsonValToNbt(jsonbt, null, NBType.COMPOUND, NBType.UNKNOWN);
|
||||
craftItemStack.getHandle().tag = (NBTTagCompound) nbt;
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ public class NbtGsonConverter
|
||||
public final static String NAME = "name";
|
||||
|
||||
// -------------------------------------------- //
|
||||
// GSON 2 NBT
|
||||
// GSON TO NBT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public static NBTBase gsonToNbt(JsonElement jsonElement)
|
||||
|
Loading…
Reference in New Issue
Block a user