[1.12] Inverted Laser Lenses can cause server crash
robertmaxton42 opened this issue ยท 1 comments
Industrial Foregoing Version: 1.12.13
TeslaCoreLib Version: 1.12.2-1.0.17
Crashlog If Applicable (Upload to pastebin/gist): https://pastebin.com/czT1kmJx
I've attached the crashlog on general principles, but I'm pretty sure I've found the relevant line. After line 196 of LaserBaseTile.java, the weighting of each ore is not subject to bounds checking after being adjusted by the list of lenses. If it should so happen that there are enough inverted lenses that the total weight is negative, WeightedRandom.getRandomItem
will throw an exception and crash. As you can see above.