- What is data merging?
Data merging is where if an item is stackable and can be obtained by normal means (such as an apple for example), if you wanted a certain action to trigger such as let's say if a player holds an apple to get a effect the special apple (with the unique data of 1) turns into instead of one apple with the unique data of 1 into 2 (if they get an apple which was obtained by normal means) which is problematic, as it would allow a player to duplicate that special apple.
#Preventing data merging for stackable unique items
1 messages · Page 1 of 1 (latest)
- How does this system work?
This system is dependent on the{"keep_on_death":{}}component, it's not as intrusive as the other components, when the player dies it will clear them of those unique apples, and due to the structure block (which saved that special apple) it'll also simulate the apples dropping.
Setup process
/scoreboard objectives add d dummy
/give @s structure_block
Place the structure block anywhere, then do
/give @s youritem 3 ||the 3 can any be positive integer, the max is 64, it's the item amount|| 1 ||the 1 can be any positive integer, the max being 32767, it's the data of the item|| {"keep_on_death":{}}
Afterwards, drop the item onto a structure block, set offset to 1, set xyz to 1, you can name it anything you want, let's say you named it "hi" in the command block in the video it'll be /structure load hi ~~~ (with the execute)
the final setup step is changing the hasitem target selector argument according to your item with the specified data and quantity previously set with the /give
@a[scores={d=1},hasitem={item=youritem,data=1,quantity=3}] youritem 1 3
I recall you making a morph thing using commands if a player held out an item commands would run to make it look like as if they are that mob
If this was the survival and lets say the item was like dirt
People would just mine dirt and they'd have stacks of that special item
nah bc obtained dirt is data zero while command'd dirt is data one which makes them act liek different items to eachother
Data merging (for stackable items) is the issue with this
ohhhh yh i use books that are non stackable so i don't get this issue ;-;
Why was this deleted
I looked over my commands
Wha
And realized it would load an apple for dead people
Who didn't have an apple
So I patched it up
Fair
I'm working on making it so blocks also cannot be affected by data merging
Data merging is no more
Should be easy using /ability