Mrbysco / StructureCompass

Adds a compass for each Minecraft structure
https://www.curseforge.com/minecraft/mc-mods/structure-compass
MIT License
2 stars 6 forks source link

[Bug]: Selecting a structure removes all enchantment on the structure compass #19

Closed notcake closed 4 months ago

notcake commented 4 months ago

General Info

Forge version

47.2.20

Minecraft version

1.20.1

Mod version

StructureCompass-1.20.1-2.0.8.jar

Java version

Java 17.0.8

Issue Description

  1. Enchant the structure compass with Soulbound.
  2. Shift + Right click and select a structure.
  3. The enchantment is lost.

The SetStructureMessage handler erases all other NBT tags on the item. https://github.com/Mrbysco/StructureCompass/blob/830203e9cf93b8b7178c2c02580637c60e0856c2/src/main/java/com/mrbysco/structurecompass/network/message/SetStructureMessage.java#L33-L46

Additional Information

No response

notcake commented 4 months ago

Thanks for the incredibly fast fix for this!