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

Same cachedNBT in cloned cn.nukkit.item.Item #1624

Open
AntonPPDS opened this issue Sep 29, 2020 · 0 comments
Open

Same cachedNBT in cloned cn.nukkit.item.Item #1624

AntonPPDS opened this issue Sep 29, 2020 · 0 comments

Comments

@AntonPPDS
Copy link

Expected Behavior

Item has been cloned so that it will be completely independent of the original item

Actual Behavior

Cloned item has the same CompoundTag cachedNBT object as the original item.

Steps to Reproduce

Item original = Item.get(1);
original.setCustomName("original");

Item cloned = original.clone();
cloned.setCustomName("cloned");

System.out.println(original.getCustomName()); // output "cloned"

Debug information

Nukkit: 7467d4a

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