[1.16] Enchantment Applicator cost overflow
gjerm opened this issue ยท 0 comments
Industrial Foregoing Version:
3.2.10.2
Titanium Version:
3.2.8
Crashlog If Applicable (Upload to pastebin/gist):
N/A
While testing the changes to the Enchantment Applicator, I noticed that as it can now pull from a tank on top of it, I can use a Supreme Black Hole Tank which holds the maximum amount you can store in a normal integer.
If you actually have a Supreme Black Hole Tank full of essence on top of the Applicator, the amount in the tank is added to the amount in the internal buffer of the Applicator, which then overflows and you are now unable to apply any enchantments.
If you get to the point where the application of an enchantment costs more than MAX_INT, the cost of the application also overflows, meaning it's possible to enchant silly levels with no cost at all (in my testing, I combined a Sharpness level 4437 sword with a Sharpness 4437 enchanted book and got a Sharpness 4438 sword without having any essence in a tank above, or in the internal buffer of the Applicator.
So it looks like the feature of taking essence out of a tank on top of the Applicator should take into consideration how much a Supreme Black Hole Tank holds.