unilock / EMI_loot

0 stars 2 forks source link

Direct Drop Loot Tables do not get read properly on Forge. #5

Closed Electrolyte220 closed 5 months ago

Electrolyte220 commented 5 months ago

Hi, Firstly, thanks for porting this to Forge :). I'm running into an issue where any direct drop loot tables do not want to be read from json. The offending line is in ServerResourceData:

LootTable lootTable = GSON.fromJson(json, LootTable.class);

This line works fine on Fabric, but on Forge, it produces the following error: Cannot invoke "java.util.Deque.peek()" because the return value of "java.lang.ThreadLocal.get()" is null. I've also tried looking into fixing this myself, however I've come up empty handed. I wish you the best of luck! :D

Thanks, Electrolyte

unilock commented 5 months ago

Fixed with https://github.com/unilock/EMI_loot/commit/fb164b750c79d14cfe894caec2cc406f2f00e787, since of course Forge does things special.