Mystical World

Mystical World

19M Downloads

[1.14] conflicting loot table methods

IchigoGames opened this issue ยท 6 comments

commented

This is a bug report to multiple others invoicing multiple mods i'm going to write this in a way that makes it possible to
copy and paste as much of this as i can into each mod others issue page sorry if this is not in the right format.

The issue i am having is that all most all loot chests in my world are empty this is a new world btw after a lot of testing
removing and adding mods one at a time iv come up with a list of mods that by them selfs may work find but when put into
a modpack are conflicting with each other and the result is a empty loot chests the mods will be listed below

Jack-O'-Launcher-1.14.4-1.2.0
mysticalworld-1.14.4-1.5.1
PotionCapsule-1.1.0

all i ask is that each of you look at how your adding your items into the loot table and make sure its the correct method
and not done in a way that would easily confetti with other mods trying to add there items into the same chests.

if anyone of you need more info please let me know and thank you for your time.

commented

the listed mods aslo conflict with mod like EnigmaticLegacy-1.4.0 Apotheosis-1.14.4-2.4.1 and SilentGems-1.14.4-3.4.6+79 but with just these mods and not the mods in the issue report they all work together and the chest are not empty.

commented

My reply was somehow lost. I'm not sure how this could be happening given that the method we use is specifically non-destructive. It shouldn't be affected by the original loot table being changed, nor by anyone else using the same method.

All it does it, on the loot table registration event, adds an additional pool to the loot table -- adding, not overwriting. This should be compatible with any other method that adds additional pools, i.e., loot table injection.

commented

For more relevance, our method of chest loot table modification should be non-destructive: https://github.com/MysticMods/MysticalWorld/blob/1.14/src/main/java/epicsquid/mysticalworld/events/LootHandler.java#L26

It specifically finds the loot table event and then adds an additional pool to that table based on our inject table. As far as I'm aware this should have no effect on a) the original loot table, or b) any other modifications made in the same method (as they should stack), c) anyone blanket replacing the loot table after-the-fact.

I know for certain it works with the grass loottable fine with just Mystical World, so I think your problem is likely to be in one of the other mods.

commented

I'm going to close this issue as, in a world with just Mystical World and Mystical Lib, there are no issues with generating loot tables using the following:

/setblock ~ ~ ~ chest{LootTable:"chests/simple_dungeon"}

commented

Further investigation has led me to notice issues with the loot table injection which causes null pointers for later injectors and thus the entire loot table to fail. I'll address these.

commented

So, this appears to be mostly caused by using the LootPool.Builder to make a new pool and appending it to the table through the injection event but failing to use .name("name your pool"), as the addPool method itself iterates over every pool and calls name.isEqual, dereferencing into a null pointer.

This is fixed in the most recent release (1.5.2).