3

How to use /data to change enchantment data?

Press_Start_or_A11/3/24 3:40 pm
11/27/2024 6:21 pm
Press_Start_or_A
I've been hosting a Minecraft server for a few weeks now and would like to ban density. How can I use a command to make it so that density is removed from a player's mace as soon as they hold it. I know that /data get entity @s SelectedItem.components.minecraft:enchantments.levels.minecraft:density returns the level of density on the person using the command's mace, but /data modify entity @s SelectedItem.components.minecraft:enchantments.levels.minecraft:density set value (number) doesn't work, as it says "Unable to modify player data" Can someone give me a command that works with this. By the way, you don't have to work out anything using /execute, I can do that.
Posted by
Press_Start_or_A
Level 1 : New Miner
0

Create an account or sign in to comment.

1

Press_Start_or_A
11/27/2024 6:21 pm
Level 1 : New Miner
wow thx planet minecraft forums, this is so useful
1

Welcome