MineColonies

MineColonies

53M Downloads

[bug]Wrong minPercentageToCraft formula

averman opened this issue ยท 1 comments

commented

return amountOfValidBlocks > 0 && blocks/amountOfValidBlocks > MIN_PERCENTAGE_TO_CRAFT;

instead of blocks/amountOfValidBlocks
it should be
amountOfValidBlocks/blocks

my test case: I create a recipe of 1 wood + 1 dirt that yield stairs
according to this recipe
blocks = 2; amountOfValidBlocks = 1

with the original formula of blocks/amountOfValidBlocks the percentage will be 2
it supposed to be 0.5

commented

True, good catch, fix merged