Skip to content

Commit

Permalink
Fix issues with ore byproduct page (#2262)
Browse files Browse the repository at this point in the history
  • Loading branch information
serenibyss authored Dec 7, 2023
1 parent 3f8d6f1 commit f835f80
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import gregtech.api.unification.material.properties.OreProperty;
import gregtech.api.unification.material.properties.PropertyKey;
import gregtech.api.unification.ore.OrePrefix;
import gregtech.client.utils.TooltipHelper;
import gregtech.common.metatileentities.MetaTileEntities;

import net.minecraft.client.resources.I18n;
Expand Down Expand Up @@ -296,7 +297,7 @@ public void addTooltip(int slotIndex, boolean input, Object ingredient, List<Str
ChancedItemOutput entry = chances.get(slotIndex);
double chance = entry.getChance() / 100.0;
double boost = entry.getChanceBoost() / 100.0;
tooltip.add(I18n.format("gregtech.recipe.chance", chance, boost));
tooltip.add(TooltipHelper.BLINKING_CYAN + I18n.format("gregtech.recipe.chance", chance, boost));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import gregtech.api.GTValues;
import gregtech.api.gui.GuiTextures;
import gregtech.api.recipes.chance.output.ChancedOutputLogic;
import gregtech.api.unification.OreDictUnifier;
import gregtech.api.unification.material.Materials;
import gregtech.api.unification.ore.OrePrefix;
Expand Down Expand Up @@ -150,7 +151,8 @@ public void setRecipe(IRecipeLayout recipeLayout, @NotNull OreByProduct recipeWr
itemOutputExists.clear();
for (int i = 0; i < ITEM_OUTPUT_LOCATIONS.size(); i += 2) {
itemStackGroup.init(i / 2 + itemInputs.size(), false,
new ItemStackTextRenderer(recipeWrapper.getChance(i / 2 + itemInputs.size()), null),
new ItemStackTextRenderer(recipeWrapper.getChance(i / 2 + itemInputs.size()),
ChancedOutputLogic.OR),
ITEM_OUTPUT_LOCATIONS.get(i) + 1, ITEM_OUTPUT_LOCATIONS.get(i + 1) + 1, 16, 16, 0, 0);
itemOutputExists.add(itemOutputs.get(i / 2).size() > 0);
}
Expand Down

0 comments on commit f835f80

Please sign in to comment.