RFTools

RFTools

74M Downloads

EndergenicTileEntity.java minor bug (with fix)

Opened this issue ยท 2 comments

commented

Line 279
if (random.nextInt(1000) <= EndergenicConfiguration.chanceLost) {

This should be:
if (random.nextInt(1000)+1 <= EndergenicConfiguration.chanceLost) {

Reason: nextInt is exclusive, and starts at 0. As such, it will return a random number between 0 and 999. This means the chance to discard a pearl is slightly higher than intended (by default 0 through 5 will discard a pearl, as opposed to 1 through 5 as the config suggests).

commented

Thinking on it, you could also just change <= to < instead, and keep the 0-999.

commented

I'm not going to change this as this is rather delicate and too many builds depend on how it works right now