mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-20 04:09:45 +00:00
fixed rounding in chain calculation
This commit is contained in:
1 parent
9873de760f
commit
4953edde4b
1 file changed
+1
-1
@@ -276,7 +276,7 @@ public class BookmarkCraftingChain {
|
||||
if (!request.initialItems.contains(item.recipeIndex) && item.factor > 0) {
|
||||
long ingrCount = calculateCount(request, request.inputs.get(item.stackIndex));
|
||||
long outputCount = calculateCount(request, request.outputs.get(item.stackIndex));
|
||||
long shift = (ingrCount - outputCount) / item.factor;
|
||||
long shift = (long) Math.ceil((ingrCount - outputCount) / (double) item.factor);
|
||||
|
||||
if (shift > 0 && shift < minShift) {
|
||||
minShift = (int) shift;
|
||||
|
||||
Reference in new issue
Block a user