Supplementaries

Supplementaries

110M Downloads

Majrusz's Enchantments compatibility

Majrusz opened this issue ยท 2 comments

commented

Hi, one of our players reported to me that our mods are not compatible, because whenever he tries to break an urn with Telekinesis enchantment it gives him way too much loot. As far I can see your urn tries to always drop some loot (https://github.com/MehVahdJukaar/Supplementaries/blob/master/common/src/main/java/net/mehvahdjukaar/supplementaries/common/block/blocks/UrnBlock.java#L228) and my enchantment tries to clear generated loot in order to add it directly to player's inventory. The easiest (but ugly) solution would be to add such check:

            do {
                selectedLoot = loottable.getRandomItems(lootContext);
                if(selectedLoot.isEmpty()) break; // compatibility with other mods that clear generated loot
                //remove disabled stuff. hacky
                selectedLoot = selectedLoot.stream().filter(e -> e.getItem().getItemCategory() != null).toList();
            } while (selectedLoot.isEmpty());

but I think it would be better to come up with other solution to check for disabled items properly.

Mods to reproduce:

  • majrusz-library-1.19.2-4.0.0
  • majruszs-enchantments-1.19.2-1.8.2
  • moonlight-1.19.2-2.2.34
  • supplementaries-1.19.2-2.3.15

Video: https://imgur.com/a/dUzAk1l

commented

Great, thank you!

commented

that's actually already how the code is in 1.19.4. ill backport to 1.19.2