way2muchnoise / JustEnoughResources

A rewrite of NotEnoughResources using JustEnoughItems
Other
120 stars 63 forks source link

[1.20.1 Forge] JER does not pass an entity to villager trades which crashes Repurposed Structures #516

Open TelepathicGrunt opened 2 weeks ago

TelepathicGrunt commented 2 weeks ago

A user reported the issue here to me: https://github.com/TelepathicGrunt/RepurposedStructures/issues/346

The crash is here: https://github.com/TelepathicGrunt/RepurposedStructures/blob/8f8e9a7a456389530520235fb956fa02a32e1595/common/src/main/java/com/telepathicgrunt/repurposedstructures/misc/maptrades/StructureSpecificMaps.java#L53

It looks like JER is passing a null entity to my getOff method I overrode from VillagerTrades.ItemListing. I needed the level from the entity to get a holderset of structures from a tag. Allowing my map trade to pick a random structure from a tag to locate. By passing in a null entity, which I can't expect, nor shield against without losing my functionality, my mod breaks as a result. Can an entity be passed in please? Could be a dummy villager if needed as long as it has a level ideally

KakashoLin commented 2 weeks ago

Getting similar issue here, seems it is effecting all traders from multiple mods.

Edit: It might be an issue with the latest forge update since JEI is making people upgrade their forge versions.