Skip to content

Commit b33edac

Browse files
authored
fix int EUt cast with euDiscount (GregTechCEu#2818)
1 parent 5fdd649 commit b33edac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/gregtech/api/capability/impl/AbstractRecipeLogic.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ public boolean prepareRecipe(Recipe recipe, IItemHandlerModifiable inputInventor
492492
if (euDiscount > 0 || speedBonus > 0) { // if-statement to avoid unnecessarily creating RecipeBuilder object
493493
RecipeBuilder<?> builder = new RecipeBuilder<>(recipe, recipeMap);
494494
if (euDiscount > 0) {
495-
int newEUt = (int) Math.round(recipe.getEUt() * euDiscount);
495+
long newEUt = Math.round(recipe.getEUt() * euDiscount);
496496
if (newEUt <= 0) newEUt = 1;
497497
builder.EUt(newEUt);
498498
}

0 commit comments

Comments
 (0)