Skip to content

Mohist removes display.color NBT from modded dyed items during normal inventory drag-and-drop #3692

Description

@BorniGood

Minecraft Version : 1.20.1

Mohist Version : 46ca730

Operating System : Windows 11

Logs : This bug doesn't show up in logs

Mod list : Epic Knights

Plugin list : Doesn't matter, the bug appears without plugins

Description of issue : On a modded 1.20.1 Forge server, some modded items that use the vanilla color tag lose their color when moved around in the inventory with normal left-click drag-and-drop. The problem does not happen in singleplayer with the same modpack, and it also appears to be tied specifically to running the pack on Mohist. Another important point is that no errors or warnings appear in the logs when this happens. I checked the logs while reproducing the issue, and there is no relevant error, warning, or stack trace at the moment when the color tag is removed. The NBT tag that gets removed is:

display:{color:}

After a few normal manual moves between inventory slots, the item keeps its ID and other NBT such as Damage, but the display.color tag is removed.

Example

Before:

{id:"slavicarmory:gilded_vyshman_chestplate",Count:1b,tag:{Damage:0,display:{color:16741580}}}

After moving the item between slots several times:

{id:"slavicarmory:gilded_vyshman_chestplate",Count:1b,tag:{Damage:0}}

So the item itself remains, but the color tag is stripped.

Important observations

This happens on Mohist.
In singleplayer with the same mods, the problem does not occur.
The color loss happens when the item is moved in the inventory using normal left-click pickup/place behavior.
Shift-click equip/unequip did not remove the color in testing.
Only the color tag is lost. This does not look like full NBT corruption.
No relevant errors, warnings, or stack traces appear in either latest.log or during the reproduction of the issue.
This affects modded items using display.color, not just one specific item logic path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions