Multiblock size counting incorrect
LemmaEOF opened this issue ยท 11 comments
Quote from CurseForge:
I am using the 1.2-dev.55 beta, and it seems that a 10 x 10 x 5 boiler (500 blocks) is the maximum size, as a 10 x 10 x 6 (600 blocks) gives an error stating that the maximum size is 1000 blocks, which is larger than the boiler I built. If the maximum size has changed, could the error be updated? Otherwise, could that (likely) math error be fixed?
As your scan code is adapted from Correlated, you also adopt the Correlated network scanner's main pitfall: it includes "misses" in the iteration count. So if you have a single block with no other valid blocks next to it, itr
will be 7. This pitfall is detailed in the last paragraph of the scanning section of the Controller wiki page.
Oh yay. It all boils down to having to rebuild the scan code again. I've really gotta try and do something with that sometime.
You can monkey patch this in the interim by checking members.size()
instead of itr
, as you're using it for gameplay balance rather than a performance optimization.
Yeah, I'll do that for now. Still gotta fix the scanning as a whole, but that'll fix it for now.
It looks like the maximum possible blocks in a boiler at the moment is 576, a 10x10x5 with 76 blocks on top. It's definitely this function that has the problem since that's where the boiler size check is.
Note to others: This bug was fixed in 9458cf3 however still exists in the latest version on CurseForge (v1.2-dev.55) which was released before patch 9458cf3.
A workaround is to change the config in betterboilers.cfg
, from I:defaultMaxMultiblock=1000
to a very large number, say I:defaultMaxMultiblock=999999
.
@Boundarybreaker Ha! Given #17 (comment) I wasn't expecting any maintenance. :)
Well luckily I don't actually need to write a single line of code to get this published, since it's already fixed ^^;
The fix for this is now live.