Botania (Fabric/Quilt)

Botania (Fabric/Quilt)

5M Downloads

server crash on attempting to enchant with an invalid/disabled enchant

IRSmoh opened this issue ยท 0 comments

commented

https://gist.github.com/Vyraal1/b4cef51028c2393bb611da65a37a67ce

https://github.com/Vazkii/Botania/blob/master/src/main/java/vazkii/botania/common/block/tile/TileEnchanter.java#L391

is the afflicted line, through some convolutions it is possible to wind up with an enchant that is NULL (previously available on items, but now disabled due to config changes). And attempting to enchant with the book/item would crash. Inserting a null check should prevent further crashes.