From ba5a2529df78cade034d6a052a6f37a8d75c7ebc Mon Sep 17 00:00:00 2001 From: Nedelosk Date: Mon, 16 May 2016 00:10:45 +0200 Subject: [PATCH] Fix #1178 Duplicate recipes for carrot > fruit juice,. Fix #1169 Rendering of bronze tools, Fix #1177 Toolips for squeezer and centrifuge recipes --- .../forestry/core/recipes/jei/ForestryTooltipCallback.java | 4 ++++ src/main/java/forestry/factory/PluginFactory.java | 2 -- .../recipes/jei/centrifuge/CentrifugeRecipeCategory.java | 1 + .../factory/recipes/jei/squeezer/SqueezerRecipeCategory.java | 1 + .../resources/assets/forestry/models/item/bronzePickaxe.json | 2 +- .../resources/assets/forestry/models/item/bronzeShovel.json | 2 +- 6 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/forestry/core/recipes/jei/ForestryTooltipCallback.java b/src/main/java/forestry/core/recipes/jei/ForestryTooltipCallback.java index 177d20fe0..0d5909ab7 100644 --- a/src/main/java/forestry/core/recipes/jei/ForestryTooltipCallback.java +++ b/src/main/java/forestry/core/recipes/jei/ForestryTooltipCallback.java @@ -36,6 +36,10 @@ public class ForestryTooltipCallback implements ITooltipCallback { } } + public void clearTooltip(){ + tooltips.clear(); + } + public void addChanceTooltip(int index, float chance) { if (chance <= 0.0F) { tooltips.get(index).add(TextFormatting.GRAY + String.format(Translator.translateToLocal("forestry.jei.chance"), Translator.translateToLocal("forestry.jei.chance.never"))); diff --git a/src/main/java/forestry/factory/PluginFactory.java b/src/main/java/forestry/factory/PluginFactory.java index e0690576d..295ea37d2 100644 --- a/src/main/java/forestry/factory/PluginFactory.java +++ b/src/main/java/forestry/factory/PluginFactory.java @@ -268,8 +268,6 @@ public class PluginFactory extends BlankForestryPlugin { RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{new ItemStack(Items.CARROT)}, Fluids.JUICE.getFluid(appleJuiceAmount), PluginCore.items.mulch.getItemStack(), appleMulchAmount); - RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{new ItemStack(Items.CARROT)}, Fluids.JUICE.getFluid(appleJuiceAmount), - PluginCore.items.mulch.getItemStack(), appleMulchAmount); int seedOilAmount = ForestryAPI.activeMode.getIntegerSetting("squeezer.liquid.seed"); FluidStack seedOil = Fluids.SEED_OIL.getFluid(seedOilAmount); RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{new ItemStack(Items.WHEAT_SEEDS)}, seedOil); diff --git a/src/main/java/forestry/factory/recipes/jei/centrifuge/CentrifugeRecipeCategory.java b/src/main/java/forestry/factory/recipes/jei/centrifuge/CentrifugeRecipeCategory.java index a597e9a42..00d153daf 100644 --- a/src/main/java/forestry/factory/recipes/jei/centrifuge/CentrifugeRecipeCategory.java +++ b/src/main/java/forestry/factory/recipes/jei/centrifuge/CentrifugeRecipeCategory.java @@ -68,6 +68,7 @@ public class CentrifugeRecipeCategory extends ForestryRecipeCategory { guiItemStacks.init(inputSlot, true, 4, 18); guiItemStacks.setFromRecipe(inputSlot, recipeWrapper.getInputs()); CentrifugeRecipeWrapper centrifugeWrapper = (CentrifugeRecipeWrapper) recipeWrapper; + tooltip.clearTooltip(); setResults(centrifugeWrapper.getRecipe().getAllProducts(), (GuiItemStackGroup) guiItemStacks); guiItemStacks.addTooltipCallback(tooltip); } diff --git a/src/main/java/forestry/factory/recipes/jei/squeezer/SqueezerRecipeCategory.java b/src/main/java/forestry/factory/recipes/jei/squeezer/SqueezerRecipeCategory.java index 33ee045c7..3a5eada82 100644 --- a/src/main/java/forestry/factory/recipes/jei/squeezer/SqueezerRecipeCategory.java +++ b/src/main/java/forestry/factory/recipes/jei/squeezer/SqueezerRecipeCategory.java @@ -70,6 +70,7 @@ public class SqueezerRecipeCategory extends ForestryRecipeCategory { guiItemStacks.init(craftOutputSlot, false, 87, 43); guiItemStacks.set(craftOutputSlot, wrapper.getOutputs()); + tooltip.clearTooltip(); tooltip.addChanceTooltip(craftOutputSlot, chance); setIngredients(guiItemStacks, wrapper.getInputs()); diff --git a/src/main/resources/assets/forestry/models/item/bronzePickaxe.json b/src/main/resources/assets/forestry/models/item/bronzePickaxe.json index fb0386429..886fa8fcc 100644 --- a/src/main/resources/assets/forestry/models/item/bronzePickaxe.json +++ b/src/main/resources/assets/forestry/models/item/bronzePickaxe.json @@ -1,5 +1,5 @@ { - "parent": "item/generated", + "parent": "item/handheld", "textures": { "layer0": "forestry:items/bronzePickaxe" } diff --git a/src/main/resources/assets/forestry/models/item/bronzeShovel.json b/src/main/resources/assets/forestry/models/item/bronzeShovel.json index db0ad9bb9..9141647a1 100644 --- a/src/main/resources/assets/forestry/models/item/bronzeShovel.json +++ b/src/main/resources/assets/forestry/models/item/bronzeShovel.json @@ -1,5 +1,5 @@ { - "parent": "item/generated", + "parent": "item/handheld", "textures": { "layer0": "forestry:items/bronzeShovel" }