Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating equipped trinket's data resets Creative inventory scroll position #354

Open
TheRealWormbo opened this issue Dec 7, 2024 · 1 comment

Comments

@TheRealWormbo
Copy link

Whenever the data of an equipped trinket item changes while the creative inventory is open, it resets the scroll position. This does not happen when data of an item in a vanilla slot changes, e.g. equipped armor or held tool.

How to reproduce

Option 1: using Botania (1.20.1)

This was originally reported as a Botania bug.

  1. Equip an empty Band of Mana.
  2. Set up some sort of mana gain, e.g. via equipped Band of Aura.
  3. Open creative inventory and scroll down in any tab. Whenever mana is stored in the Band of Mana, the scroll position resets to the top.

Option 2: using Elytra Slot (tested in 1.20.1 and 1.21.1)

  1. Equip a damaged elytra with mending in the cape slot.
    (1.20.1: /give @s minecraft:elytra{damage:431}, 1.21.1: /give @s minecraft:elytra[minecraft:damage=431]; then /enchant @p minecraft:mending)
  2. Set up a way to gain XP, e.g. a command block summoning XP orbs (/summon minecraft:experience_orb ~ ~ ~ {Value:1}) on a timer (e.g. repeater loop).
  3. Open creative inventory and scroll down in any tab. Whenever an XP orb is picked up and repairs the elytra, the scroll position resets to the top.
@TheRealWormbo
Copy link
Author

Update: Changing NBT data also appears to cause the equipped trinket's unequip and equip events to fire. Most likely related to the changes in PR #296, which makes that very important functional change seemingly without providing a way to distinguish between that "internal reequip" and an actual player-caused trinket swap.

This seems to be the cause for VazkiiMods/Botania#4758, which worked fine with Trinkets 3.7.0 and is broken in Trinkets 3.7.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant