From 305f3f78ec2398eb0c7f69468640e016943c5cab Mon Sep 17 00:00:00 2001 From: mezz Date: Thu, 11 Aug 2016 02:44:25 -0700 Subject: [PATCH] Update JEI --- gradle.properties | 2 +- src/main/java/forestry/Forestry.java | 2 +- .../recipes/jei/WorktableRecipeTransferHandler.java | 12 +++++------- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/gradle.properties b/gradle.properties index dbcc75813..32b6de99e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ forgeversion=12.18.1.2044 mcp_mappings=snapshot_20160525 tesla_version=1.10.2-1.2.1.41 -jei_version=3.7.3.221 +jei_version=3.8.0.240 ic2_version=2.6.15-ex110 version_major=5 diff --git a/src/main/java/forestry/Forestry.java b/src/main/java/forestry/Forestry.java index e795bf8bf..22ae2761a 100644 --- a/src/main/java/forestry/Forestry.java +++ b/src/main/java/forestry/Forestry.java @@ -52,7 +52,7 @@ import forestry.plugins.PluginManager; guiFactory = "forestry.core.config.ForestryGuiConfigFactory", acceptedMinecraftVersions = "[1.10]", dependencies = "required-after:Forge@[12.18.0.1989,);" - + "after:JEI@[3.7.0,);" + + "after:JEI@[3.8.0,);" + "after:" + PluginIC2.modId + ";") public class Forestry { diff --git a/src/main/java/forestry/factory/recipes/jei/WorktableRecipeTransferHandler.java b/src/main/java/forestry/factory/recipes/jei/WorktableRecipeTransferHandler.java index 18cb8590b..fa91fd4b0 100644 --- a/src/main/java/forestry/factory/recipes/jei/WorktableRecipeTransferHandler.java +++ b/src/main/java/forestry/factory/recipes/jei/WorktableRecipeTransferHandler.java @@ -15,12 +15,11 @@ import mezz.jei.api.recipe.VanillaRecipeCategoryUid; import mezz.jei.api.recipe.transfer.IRecipeTransferError; import mezz.jei.api.recipe.transfer.IRecipeTransferHandler; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.Container; import net.minecraft.item.ItemStack; -class WorktableRecipeTransferHandler implements IRecipeTransferHandler { +class WorktableRecipeTransferHandler implements IRecipeTransferHandler { @Override - public Class getContainerClass() { + public Class getContainerClass() { return ContainerWorktable.class; } @@ -31,11 +30,10 @@ class WorktableRecipeTransferHandler implements IRecipeTransferHandler { @Nullable @Override - public IRecipeTransferError transferRecipe(@Nonnull Container container, @Nonnull IRecipeLayout recipeLayout, @Nonnull EntityPlayer player, boolean maxTransfer, boolean doTransfer) { + public IRecipeTransferError transferRecipe(@Nonnull ContainerWorktable container, @Nonnull IRecipeLayout recipeLayout, @Nonnull EntityPlayer player, boolean maxTransfer, boolean doTransfer) { Map> guiIngredients = recipeLayout.getItemStacks().getGuiIngredients(); - ContainerWorktable containerWorktable = (ContainerWorktable) container; - InventoryCraftingForestry inventory = new InventoryCraftingForestry(containerWorktable); + InventoryCraftingForestry inventory = new InventoryCraftingForestry(container); List recipeOutputs = Collections.emptyList(); for (Map.Entry> entry : guiIngredients.entrySet()) { @@ -53,7 +51,7 @@ class WorktableRecipeTransferHandler implements IRecipeTransferHandler { if (!recipeOutputs.isEmpty() && doTransfer) { MemorizedRecipe recipe = new MemorizedRecipe(inventory, recipeOutputs); - containerWorktable.sendWorktableRecipeRequest(recipe); + container.sendWorktableRecipeRequest(recipe); } return null;