Skip to content

Commit

Permalink
Fix #1178 Duplicate recipes for carrot > fruit juice,. Fix #1169 Rend…
Browse files Browse the repository at this point in the history
…ering of bronze tools, Fix #1177 Toolips for squeezer and centrifuge recipes
  • Loading branch information
Nedelosk committed May 15, 2016
1 parent 5188b5a commit ba5a252
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ public void onTooltip(int index, boolean input, ItemStack ingredient, List<Strin
}
}

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")));
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/forestry/factory/PluginFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,6 @@ public void registerRecipes() {
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapp
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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapp

guiItemStacks.init(craftOutputSlot, false, 87, 43);
guiItemStacks.set(craftOutputSlot, wrapper.getOutputs());
tooltip.clearTooltip();
tooltip.addChanceTooltip(craftOutputSlot, chance);
setIngredients(guiItemStacks, wrapper.getInputs());

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"parent": "item/generated",
"parent": "item/handheld",
"textures": {
"layer0": "forestry:items/bronzePickaxe"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"parent": "item/generated",
"parent": "item/handheld",
"textures": {
"layer0": "forestry:items/bronzeShovel"
}
Expand Down

0 comments on commit ba5a252

Please sign in to comment.