So in the new 1.13 snapshot we didn't only get the new horse necks we've got a whole new level of commands, and one of the most changed it the
/execute command i tried to figure what each of them do but i just can't find a way how to test for IF an entity has a score of collapse 40 then run a commands here is the 1.12.2 format:
execute @e[score_collapse=40,score_collapse_min=40] ~ ~ ~ say hello
All typical /execute commands from pre-1.13 will change as follows:
Pre-1.13:
/execute @e[score_collapse=40,score_collapse_min=40] ~ ~ ~ say hello
/execute @e[score_collapse=40,score_collapse_min=40] ~ ~ ~ detect X Y Z minecraft:chest facing=south say hello
1.13 (discounting positional arguments):
/execute as @e[scores={collapse=40}] run say hello
/execute as @e[scores={collapse=40}] if block X Y Z minecraft:chest[facing=south] run say hello
1.13 (assuming at the "as" target's position, only with no offset (~ ~ ~)):
/execute as @e[scores={collapse=40}] at @s run say hello
/execute as @e[scores={collapse=40}] at @s if block X Y Z minecraft:chest[facing=south] run say hello
1.13 (assuming the need to change offset coordinates from target's location):
/execute as @e[scores={collapse=40}] at @s offset ~ ~5 ~ run say hello
/execute as @e[scores={collapse=40}] at @s offset ~ ~5 ~ if block X Y Z minecraft:chest[facing=south] run say hello
Essentially /execute now has a bunch of subarguments that can be specified in any order. Using the last command from the above examples, the subarguments are:
as @e[scores={collapse=40}]
at @s
offset ~ ~5 ~
if block X Y Z minecraft:chest[facing=south]
run say hello
Thank you very much it works before this reply i had really low knowledge on the new commands and mostly on execute but now i think i understand it. <3
how do you make multi items for right click detection. such as if you already made a carrot on a stick to do a function and now you need an other carrot on a stick to do something else?. from what i remember in 1.12 you could just do /give @p minecraft:carrot_on_a_stick {rightclick:1b}. But I can't do that anymore. If anyone could help, thank you ahead of time.
This is all well and good, and 1.13 is officially out now of course, but I all I really need right now is to know how to reset a command block after it gets a successful result. You used to be able to simply use the /blockdata command to reset it, but this has obviously been removed. Therefore, is there a way to reset a command block's Result with the /execute command? Or is there a simpler way?
how do you make multi items for right click detection. such as if you already made a carrot on a stick to do a function and now you need an other carrot on a stick to do something else?. from what i remember in 1.12 you could just do /give @p minecraft:carrot_on_a_stick {rightclick:1b}. But I can't do that anymore. If anyone could help, thank you ahead of time.
That actually wouldn't have worked in 1.12, as that is the new 1.13 syntax. What you've written should work in 1.13, and then you would just need to differentiate between each carrot on a stick. So:
This is all well and good, and 1.13 is officially out now of course, but I all I really need right now is to know how to reset a command block after it gets a successful result. You used to be able to simply use the /blockdata command to reset it, but this has obviously been removed. Therefore, is there a way to reset a command block's Result with the /execute command? Or is there a simpler way?
/blockdata was moved over to /data. So all you need to do is:
That actually wouldn't have worked in 1.12, as that is the new 1.13 syntax. What you've written should work in 1.13, and then you would just need to differentiate between each carrot on a stick. So:
So in the new 1.13 snapshot we didn't only get the new horse necks we've got a whole new level of commands, and one of the most changed it the
/execute command i tried to figure what each of them do but i just can't find a way how to test for IF an entity has a score of collapse 40 then run a commands here is the 1.12.2 format:
execute @e[score_collapse=40,score_collapse_min=40] ~ ~ ~ say hello
Thanks for all people that answered
All typical /execute commands from pre-1.13 will change as follows:
Pre-1.13:
1.13 (discounting positional arguments):
1.13 (assuming at the "as" target's position, only with no offset (~ ~ ~)):1.13 (assuming the need to change offset coordinates from target's location):
Essentially /execute now has a bunch of subarguments that can be specified in any order. Using the last command from the above examples, the subarguments are:
Dinnerbone's reddit post has a lot more details on this, a well as selector changes: https://www.reddit.com/user/Dinnerbone/comments/6l6e3d/a_completely_incomplete_super_early_preview_of/
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
Thank you very much it works before this reply i had really low knowledge on the new commands and mostly on execute but now i think i understand it. <3
The "as" selector executes a command as if the targeted entity ran it, but the location of the result event is where the execute command was ran.
Instead, use /execute as @e[scores={Click=1}] at @s
how do you make multi items for right click detection. such as if you already made a carrot on a stick to do a function and now you need an other carrot on a stick to do something else?. from what i remember in 1.12 you could just do /give @p minecraft:carrot_on_a_stick {rightclick:1b}. But I can't do that anymore. If anyone could help, thank you ahead of time.
This is all well and good, and 1.13 is officially out now of course, but I all I really need right now is to know how to reset a command block after it gets a successful result. You used to be able to simply use the /blockdata command to reset it, but this has obviously been removed. Therefore, is there a way to reset a command block's Result with the /execute command? Or is there a simpler way?
That actually wouldn't have worked in 1.12, as that is the new 1.13 syntax. What you've written should work in 1.13, and then you would just need to differentiate between each carrot on a stick. So:
Then you run whatever commands are needed based on the tag of the carrot on a stick the player is holding when they right click.
/blockdata was moved over to /data. So all you need to do is:
Understood. Thank you!