how can I customize an Item like an egg to not stack with other eggs except the eggs with same customization
and to detect it when it is thrown
I tried tagging them but that returns normal as soon as I collect them
To make the egg almost extinguishable from other eggs but unable to stack, use HideFlags
To detect that egg to be thrown, well... just a little bit complicated...
In chat:
1. /scoreboard objectives add a dummy
2. /scoreboard objectives add b stat.useItem.minecraft.egg dummy
Chain commands:
1R: /scoreboard players set @a a 3 {SelectedItem:{id:"minecraft:egg",tag:{HideFlags:blah blah blah...}}}
2C: /execute @a[score_a_min=1,score_b_min=1] ~ ~ ~ ...
3C: /scoreboard players remove @a[score_b_min=1] b 1
4C: /scoreboard players remove @a[score_a_min=1] a 1
Tag the players when they are holding the egg and if a tagged player has used an egg (detected by the scoreboard),the execute command would be successful:
/scoreboard players tag @a[tag=holdEgg] remove holdEgg
/scoreboard players tag @a add holdEgg {SelectedItem:{id:"minecraft:egg",tag:{unstack:1b}}}
Tag the players when they are holding the egg and if a tagged player has used an egg (detected by the scoreboard),the execute command would be successful:
/scoreboard players tag @a[tag=holdEgg] remove holdEgg
/scoreboard players tag @a add holdEgg {SelectedItem:{id:"minecraft:egg",tag:{unstack:1b}}}
Apart from the above, just a general remark: be sure to look into functions. Those are pretty much the best thing to have around for custom items, also because they allow you to easily change the color of all your items (name, lore, etc.).
Not many people know to change their encoding to UTF-8 without BOM tho...
Or am I right...
You don't even need that perse. Just remember alt-0194 and the commonly known alt-21 and you're all set, now you can simply build those commands in notepad if you want.
Yes, the section symbol, §, I know that.
Not all encoding recognizing this.
And that's what happened to me.
how can I customize an Item like an egg to not stack with other eggs except the eggs with same customization
and to detect it when it is thrown
I tried tagging them but that returns normal as soon as I collect them
To make the egg almost extinguishable from other eggs but unable to stack, use HideFlags
To detect that egg to be thrown, well... just a little bit complicated...
In chat:
1. /scoreboard objectives add a dummy
2. /scoreboard objectives add b stat.useItem.minecraft.egg dummy
Chain commands:
1R: /scoreboard players set @a a 3 {SelectedItem:{id:"minecraft:egg",tag:{HideFlags:blah blah blah...}}}
2C: /execute @a[score_a_min=1,score_b_min=1] ~ ~ ~ ...
3C: /scoreboard players remove @a[score_b_min=1] b 1
4C: /scoreboard players remove @a[score_a_min=1] a 1
I didn't test it yet, so.... you know...
Thanks.
Hey, you sure @e is safe enough?
I said this mainly because of Age:0.
If I'm correct, cows and other mobs do have the tag.
I just don't know whether they can reach Age:0 though...
(Don't say I didn't warn you, report your 2 own duplicated post so you won't get reported by others.)
I just needed the unstack and display name tags
Thank you for helping me alot
I want to give you credits in the function pack I'm creating
what should I mention, do you have a youtube channel or something like that?
Not many people know to change their encoding to UTF-8 without BOM tho...
Or am I right...
Yes, the section symbol, §, I know that.
Not all encoding recognizing this.
And that's what happened to me.