From 5dc0d1a9733013560c4617313244b0bff9a86831 Mon Sep 17 00:00:00 2001 From: pahimar Date: Tue, 31 Dec 2013 02:07:23 -0500 Subject: [PATCH] Another attempt at the MCPC+ bug --- src/main/java/com/pahimar/ee3/api/RecipeMapping.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/pahimar/ee3/api/RecipeMapping.java b/src/main/java/com/pahimar/ee3/api/RecipeMapping.java index 0c5a1abc..fe9485cf 100644 --- a/src/main/java/com/pahimar/ee3/api/RecipeMapping.java +++ b/src/main/java/com/pahimar/ee3/api/RecipeMapping.java @@ -72,10 +72,8 @@ public class RecipeMapping implements JsonSerializer, JsonDeseria @Override public RecipeMapping deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext context) throws JsonParseException { - if (!jsonElement.isJsonPrimitive()) { - JsonObject jsonRecipeMapping = (JsonObject) jsonElement; WrappedStack outputStack = null; @@ -83,7 +81,7 @@ public class RecipeMapping implements JsonSerializer, JsonDeseria if (jsonRecipeMapping.get("outputWrappedStack") != null) { - outputStack = new WrappedStack().deserialize(jsonRecipeMapping.get("outputWrappedStack").getAsJsonObject(), type, context); + outputStack = new WrappedStack().deserialize(jsonRecipeMapping.get("outputWrappedStack").getAsJsonObject(), WrappedStack.class, context); } if (jsonRecipeMapping.get("inputWrappedStacks") != null) @@ -92,7 +90,7 @@ public class RecipeMapping implements JsonSerializer, JsonDeseria for (int i = 0; i < jsonInputStacks.size(); i++) { - WrappedStack inputStack = new WrappedStack().deserialize(jsonInputStacks.get(i).getAsJsonObject(), type, context); + WrappedStack inputStack = new WrappedStack().deserialize(jsonInputStacks.get(i).getAsJsonObject(), WrappedStack.class, context); inputStacks.add(inputStack); } }