Enigmatic Legacy

Enigmatic Legacy

10M Downloads

[1.16.5] Enigmatic Amulet Vessel Voiding Items

oitsjustjose opened this issue · 1 comments

commented

Versions (Be specific, do not write "latest"):

  • Enigmatic Legacy: 2.10.3
  • Curios API: 4.0.4.0
  • Patchouli: 1.16.4-48
  • Forge: 36.0.13

Description of a Bug:

Upon death (with several items in my curios slots as well as hotbar), tools in the hotbar (tool items specifically, nothing else) don't get recovered by the soul vessel

I have tested in a standalone environment with just the required 3 mods and Forge and can repro this issue. Looking through the following code snippet:

if (this.hadEnigmaticAmulet(player) && !event.getDrops().isEmpty() && EnigmaticLegacy.enigmaticAmulet.isVesselEnabled()) {
ItemStack soulCrystal = SuperpositionHandler.shouldPlayerDropSoulCrystal(player) ? EnigmaticLegacy.soulCrystal.createCrystalFrom(player) : null;
ItemStack storageCrystal = EnigmaticLegacy.storageCrystal.storeDropsOnCrystal(event.getDrops(), player, soulCrystal);
PermanentItemEntity droppedStorageCrystal = new PermanentItemEntity(dimPoint.world, dimPoint.getPosX(), dimPoint.getPosY() + 1.5, dimPoint.getPosZ(), storageCrystal);
droppedStorageCrystal.setOwnerId(player.getUniqueID());
dimPoint.world.addEntity(droppedStorageCrystal);
EnigmaticLegacy.logger.info("Summoned Extradimensional Storage Crystal for " + player.getGameProfile().getName() + " at X: " + dimPoint.getPosX() + ", Y: " + dimPoint.getPosY() + ", Z: " + dimPoint.getPosZ());
event.getDrops().clear();
if (soulCrystal != null) {
droppedCrystal = true;
}

I don't see anything wrong here, so it might just be an issue with Forge's evt.getDrops()? I'm not sure what else could be the issue here. I have this weird hunch that it's hard-coded to expect 41 slots (36 inventory, 4 armor and 1 off-hand) and is capping the event to that for some reason, essentially forcing Curios' drops to effect this? I'm really not sure, and unfortunately I haven't had a lot of time lately to look into it 😦

How to Reproduce:

  1. Have an inventory full of things, as well as all curios slots populated
  2. Die
  3. Be sad because your main tools are all gone now

Logs:

N/A

commented

Could not reproduce this, in 1.16.5, using Forge 36.0.54 with EL 2.10.3. Specifically tried putting more than 41 item into my inventory, no problems appeared.