Since LootPool.Builder has name method which allows you to set that name to whatever, using that builder and setting name to something other than null should solve the issue.
Also, its important to note that problem cause by unnamed LootPools was fixed by this Forge PR: https://github.com/MinecraftForge/MinecraftForge/pull/7605
...but it of course remains relevant to older versions of Forge, and thus to all Minecraft versions older than 1.16.5.
Bug description: Basically this line of code: https://github.com/viniciusgf2/Ambience/blob/450cc3e5ee9baec08d8ff2ded1f8e661ca8e0292/src/main/java/vazkii/ambience/Util/Handlers/EventHandlers.java#L125 ...and all alike. The problem I suspect is that
getPool
returns pool withnull
name. Injecting unnamedLootPool
s causes an error state if any other mod attempts to inject to the same table, which in turn leads to no loot being generated from affected loot table.Whether playing in Singleplayer or Multiplayer?
To reproduce: Steps to reproduce the behavior:
Expected behavior: Not this.
Screenshots Not applicable.
Mods used:
Mod version used:
Log files: Unnecessary.
Additional context: I'd suggest to change your implementation and use something like this one here, from what I can recall as immediate example: https://github.com/Shoxie12/MCDJ/blob/019ca2e6dbbc7035db5dc7dfbf8700a8cf1838f0/src/main/java/com/shoxie/mcdj/EventsHandler.java#L32-L34
Since
LootPool.Builder
has name method which allows you to set that name to whatever, using that builder and setting name to something other than null should solve the issue.For reference, you can check out this issue: https://github.com/Aizistral-Studios/Enigmatic-Legacy/issues/132 Also, this is the original report to my repository, from user who used Enigmatic Legacy to debug the issue: https://github.com/Aizistral-Studios/Enigmatic-Legacy/issues/150
Also, its important to note that problem cause by unnamed
LootPool
s was fixed by this Forge PR: https://github.com/MinecraftForge/MinecraftForge/pull/7605 ...but it of course remains relevant to older versions of Forge, and thus to all Minecraft versions older than 1.16.5.