Trinkets Compat Layer for Accessories

Trinkets Compat Layer for Accessories

3M Downloads

[1.21.1 - NeoForge] The Aether with CCLayer beta 23 leads to duplicate and/or removal of Accessories on reload

unikmhz opened this issue · 9 comments

commented

MC version: 1.21.1
NeoForge version: 21.1.115
Launcher: Prism

Synopsis

Various items with complex internal data are not able to save their state when exiting the game when using CCLayer beta 23. Downgrading to CCLayer beta 20 (while still keeping accessories beta 27 installed) fixes this problem.

Couple of examples of affected mods:

  • Sophisticated backpacks (1.3.4.1059) loses contents of worn backpacks.
  • Iron's spells and spellbooks (3.8.8) loses spells inserted into a worn spellbook.

My modlist is HUGE, but problem seems to be fixed by downgrading only the CCLayer jar, keeping all other mods intact.

Steps to reproduce

  1. Create a single-player world using CCLayer beta 20.
  2. Acquire a "sophisticated backpacks" backpack, equip it, and place some items into it.
  3. Save and exit the game.
  4. Upgrade to CCLayer beta 23.
  5. Load the game. Everything seems to be fine.
  6. Save and exit the game again.
  7. Load the game again. Backpack inventory is wiped.
commented

Ok, I'll investigate on my end and report here. Maybe it is some weird mod interop issue.

commented

Ngl tried replicating this with a minimal modpack and having a hard time having this occur like using CCLayer Beta 20 and upgrading to Beta 23 and doing two launches of the world doesn't clear the backpacks contents.

commented

Ok, I think i've found the culprit.

The problem seems to be when accessories mod is installed alongside the aether (aether-1.21.1-1.5.4-neoforge.jar, https://modrinth.com/mod/aether/version/1.21.1-1.5.4-neoforge).

Aether seems to bundle older version of accessories (1.1.0-beta.16) as an embedded library.

Don't know how to handle this yet, will try a couple of things.

commented

Easiest way to repro:

  • Install latest accessories and CCLayer, and also install aether.
  • Create a world.
  • Equip some item into a slot type that has more than 1 slot available.
  • Exit to main menu and reload the world.
  • Observe item in accessory slot being duplicated.
  • Exit the game and remove aether from modlist.
  • Problem vanishes.
commented

Some additional info:

  • "Cloned" items do not clone their associated data. Hence empty backpacks.
  • Original symptoms were probably caused by exhaustion of available slots, so cloned item overwrites the original one. But I'm not certain about that.
commented

I believe the cause is due to a funny conversion injection with aether to handle seamless transfer of accessories leading to duplicate decoding constantly: https://github.com/The-Aether-Team/The-Aether/blob/59add2436c9d1722af52f1fc9ebd075e474ca302/src/main/java/com/aetherteam/aether/event/listeners/EntityListener.java#L195

commented

Such has been communicated to the dev team and fix will be worked on coming up.

commented

The next update for aether neo should have the fix as this commits fixes the issue: The-Aether-Team/The-Aether@d4b554a

commented

A update for the aether has been pushed that fixed the bug