The Meaning of Life, the Universe, and Everything.
Join Date:
1/9/2018
Posts:
59
Minecraft:
SynergizingX
Member Details
Exactly what the title says.
Concept:
I am making a map, and when the player is standing on a diamond block lets say, they get chorus fruit. However, the moment they do not step on a diamond block, all chorus fruit from their inventory is erased.
Is it possible to perform this command in Minecraft Java Edition Vanilla?
Thank You for reading and if you know the answer or just a slight hint please do reply!
I am making a map, and when the player is standing on a diamond block lets say, they get chorus fruit. However, the moment they do not step on a diamond block, all chorus fruit from their inventory is erased.
Is it possible to perform this command in Minecraft Java Edition Vanilla?
Thank You for reading and if you know the answer or just a slight hint please do reply!
If you're in the Command Block and Functions section, you expect it to be a vanilla answer, right...?
There's still something I want to know before I start.
1. How many chorus fruit? Spam them on their inventory? Replace certain slot with fruit? Just give a certain amount of fruit?
2. When erasing, does it count normal chorus fruit that's obtainable and not from diamond block?
/execute as @a at @s if block ~ ~-1 ~ diamond_block run tag @s add onDiamond
/execute as @a at @s unless block ~ ~-1 ~ diamond_block run tag @s remove onDiamond
the above commands should be running in 2 always active repeating command blocks
place a chain command block in front of the first repeating command block (the one that contains the first command) make it conditional and use this in it:
/give @a[tag=onDiamond] chorus_fruit 10
place another chain command block, but this time in front of the second chain command block (also conditional)
/clear @a[tag=!onDiamond] chorus_fruit
If I thought this through correctly, the "give" command should only activate one time (when the player steps onto a diamond block)
Note: I haven't tested this yet so this is just a general idea of how the system works.
Exactly what the title says.
Concept:
I am making a map, and when the player is standing on a diamond block lets say, they get chorus fruit. However, the moment they do not step on a diamond block, all chorus fruit from their inventory is erased.
Is it possible to perform this command in Minecraft Java Edition Vanilla?
Thank You for reading and if you know the answer or just a slight hint please do reply!
What do I even put here....
If you're in the Command Block and Functions section, you expect it to be a vanilla answer, right...?
There's still something I want to know before I start.
1. How many chorus fruit? Spam them on their inventory? Replace certain slot with fruit? Just give a certain amount of fruit?
2. When erasing, does it count normal chorus fruit that's obtainable and not from diamond block?
the above commands should be running in 2 always active repeating command blocks
place a chain command block in front of the first repeating command block (the one that contains the first command) make it conditional and use this in it:
place another chain command block, but this time in front of the second chain command block (also conditional)
If I thought this through correctly, the "give" command should only activate one time (when the player steps onto a diamond block)
Note: I haven't tested this yet so this is just a general idea of how the system works.
Command block engineer // Developer // #TeamTrees