Spelling and a reflection freakout fix.

This commit is contained in:
Olof Larsson 2012-11-10 22:08:42 +01:00
parent b4497f9b26
commit 822db7a308
2 changed files with 6 additions and 3 deletions

View File

@ -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;
}

View File

@ -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)