SilentChaos512 / Silent-Gear

Modular tool/armor mod (formerly part of Silent's Gems)
https://www.curseforge.com/minecraft/mc-mods/silent-gear
MIT License
81 stars 37 forks source link

Silent Gear Elytra right-click equipping to curios slot issue similar to Issues #432 and #435 #616

Closed Vulp-OS closed 1 year ago

Vulp-OS commented 1 year ago

Versions

Expected Behavior

After crafting an Elytra from Silent Gear, right clicking it in inventory should auto-equip it to a supported slot (Chest Armor or Curios Back Slot) without issue and be useable.

Actual Behavior

After crafting an Elytra from Silent Gear, right clicking it in inventory immediately disconnects the player that attempted to auto-equip it. The player can no longer reconnect to the server.

In single player, the game crashes entirely.

Links/Images

Steps to Reproduce the Problem

  1. Create a minimal modpack setup based on Minecraft 1.20.1 and Forge 47.1.3 (Other versions not tested):
  2. Silent Gear, Silent Lib, Curios API, Caelus API (See versions above)
  3. Specifically, the silent gear must be crafted, it cannot be gifted without crafting via server commands (at least in my brief testing). I used the following sequence on a crafting table: For the Elytra Part:
Craft ing Table
Silent Gear Elytra Blueprint White Wool White Wool
White Wool White Wool White Wool
White Wool Empty Empty

For the Binding:

Craft ing Table
Silent Gear Binding Blueprint String Empty
Empty Empty Empty
Empty Empty Empty
  1. Combine in crafting table
  2. Right click in inventory.
  3. Crash/Disconnect
Vulp-OS commented 1 year ago

As the title suggests, this issue is similar to: #432 and #435

Vulp-OS commented 1 year ago

The workaround to allow players to access their worlds again as outlined here works for multiplayer worlds as well.

To work around this issue, you can use an NBT Editor like this one to edit the player's .dat file to remove the silentgear elytra from the impacted player's curio back slot.

This is great for allowing people to access their worlds again, but it is not a fix for the above issue.

Vulp-OS commented 1 year ago

Just saw that #611 also covers this issue. I didn't see it before submitting my issue.

embeddedt commented 1 year ago

At a quick glance the issue appears to be that the mapped name instead of SRG name (f_20937_) is provided.

https://github.com/SilentChaos512/Silent-Gear/blob/1957a942e4bcdff96294d4773625432587b5f596/src/main/java/net/silentchaos512/gear/compat/curios/CurioGearItemCapability.java#L48