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

HIDE_DYE ItemFlag not working #11212

Closed
RandomTomato opened this issue Aug 4, 2024 · 2 comments
Closed

HIDE_DYE ItemFlag not working #11212

RandomTomato opened this issue Aug 4, 2024 · 2 comments
Labels
resolution: awaiting response Additional information is required from the issue reporter type: bug Something doesn't work as it was intended to. version: 1.21 Game version 1.21

Comments

@RandomTomato
Copy link

Expected behavior

Hello, when using the newest version of Paper applying DYE to armour with the flag HIDE_DYE doesn't seem to work anymore. Looking into other similar bugs I have seen there is an issue with HIDE_ATTRIBUTES which I don't think seems to affect this as using the code provided below does hide attributes but not the dye (see reference images). Any help would be much appreciated! Thanks 😁

Currently looks like this
Image

Observed/Actual behavior

It should look like this
Image

Steps/models to reproduce

if (meta instanceof LeatherArmorMeta) {
  ((LeatherArmorMeta) meta).setColor(color);
}
// All other flags seem to work except HIDE_DYE
meta.setAttributeModifiers(material.getDefaultAttributeModifiers());
meta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES, ItemFlag.HIDE_UNBREAKABLE, ItemFlag.HIDE_DYE, ItemFlag.HIDE_ENCHANTS);

Plugin and Datapack List

[08:50:07 INFO]: - AntiPopup, Builders-Utilities, Citizens, CrateReloaded, DailyRewardsPlus, DecentHolograms, Essentials, FastAsyncWorldEdit, HeadDatabase, Images
[08:50:07 INFO]: ItemJoin, LiteBans, LuckPerms, ModelEngine, Multiverse-Core, PlaceholderAPI, PlayerParticles, PlayerVaults, ProtocolLib, ScavengedShoresAnvilGUI
[08:50:07 INFO]: ScavengedShoresBuildingUtilities, ScavengedShoresCore, ScavengedShoresVoidGenerator, ScavengedShoresWanderingNPCs, SimplePets, TAB, Vault, WorldGuard

Paper version

[08:49:33 INFO]: This server is running Paper version 1.21-124-master@df3b654 (2024-08-02T00:02:38Z) (Implementing API version 1.21-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21-108-73a863b (MC: 1.21)

Other

No response

@RandomTomato RandomTomato added status: needs triage type: bug Something doesn't work as it was intended to. labels Aug 4, 2024
@papermc-sniffer papermc-sniffer bot added the version: 1.21 Game version 1.21 label Aug 4, 2024
@papermc-projects papermc-projects bot moved this to 🕑 Needs Triage in Issues: Bugs Aug 4, 2024
@lynxplay
Copy link
Contributor

lynxplay commented Aug 9, 2024

I am having trouble replicating this with the simple snippet of

final ItemStack stack = ItemStack.of(Material.LEATHER_CHESTPLATE);
stack.editMeta(LeatherArmorMeta.class, l -> {
    l.setColor(Color.AQUA);
    l.setAttributeModifiers(stack.getType().getDefaultAttributeModifiers());
    l.addItemFlags(ItemFlag.HIDE_ATTRIBUTES, ItemFlag.HIDE_UNBREAKABLE, ItemFlag.HIDE_DYE, ItemFlag.HIDE_ENCHANTS);
});

The stack correctly hides the dye. Is there a chance any other plugin may be interfering?
Is some other logic messing with this?

@lynxplay lynxplay added resolution: awaiting response Additional information is required from the issue reporter and removed status: needs triage labels Aug 9, 2024
@papermc-projects papermc-projects bot moved this from 🕑 Needs Triage to ⌛ Awaiting Response in Issues: Bugs Aug 9, 2024
@RandomTomato
Copy link
Author

Hey! After doing some digging and using your snippet the HIDE_DYE flag now (must have been a change in 1.21?) needs to be set after the Color of the dyeable item is set. I must have missed this as it used to work that you could apply the flag whenever and then later set the color and it would still hide the line in the lore. 😅

@github-project-automation github-project-automation bot moved this from ⌛ Awaiting Response to Done in Issues: Bugs Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution: awaiting response Additional information is required from the issue reporter type: bug Something doesn't work as it was intended to. version: 1.21 Game version 1.21
Projects
Status: Done
Development

No branches or pull requests

2 participants