Added support for vanilla "nbt strings" in json recipes (#4113)

This commit is contained in:
Xalcon authored and LexManos committed 2017-07-20 16:28:39 -05:00
1 parent afea45dccc
commit d63ceb33cb
1 file changed
+7 -1
@@ -218,7 +218,13 @@ public class CraftingHelper {
// Lets hope this works? Needs test
try
{
NBTTagCompound nbt = JsonToNBT.getTagFromJson(GSON.toJson(json.get("nbt")));
JsonElement element = json.get("nbt");
NBTTagCompound nbt;
if(element.isJsonObject())
nbt = JsonToNBT.getTagFromJson(GSON.toJson(element));
else
nbt = JsonToNBT.getTagFromJson(element.getAsString());
NBTTagCompound tmp = new NBTTagCompound();
if (nbt.hasKey("ForgeCaps"))
{