I'll just wait for MrGarretto to make a converter. Problem is, I'm working on a command mod pack so everything's breaking in 1.13 and that's bad for the whole staff and team. No one asked for these changes, Mojang.
Well, since I posted this comment, I researched how to convert commands to /execute. But there is still big holes in my knowledge of 1.13 commands.
The replacment for /testfor is something like this:
/execute if @p
It's not that hard. Put that in a repeating command block with a comparator on it you will get redstone signal out based on the number of qualifying entities found.
How would i check nearest players inventory for specific item like blue banner id# 425:4 in a command block i had
testfor @p {inventory:[{id:minecraft:banner}]}
since testfor will not return the proper item regardless i want to know how the new code can condition and run a command upon seeing an item in the players slot.weapon.offhand or in their inventory at all? Innovation and simplicity is great and all but I'm becoming increasingly confused.
Hello, I am trying too test for a item in a chest with the execute command.
So far i have made it work if there is a chest it does what i want. My problem is too make it check for the NBT data.
im using this command right now:
/execute if block x y z minecraft:chest{item:minecraft:chest} run say hello
what is my mistake the error says:
Expected '}' at position 57: ...:minecraft<--[HERE]
so i figure it is something with how i write the NBT data
any help would be appreciated.
okay after much distress and very little info on how to write a proper testfor command with execute, a holy knight finally arrived by the name of deimosbtg on reddit, he gave me the info i needed to finally figure out a few things.
here are some working examples of test for commands using execute
all are one looking for things on the player
execute if entity @p[nbt={SelectedItemSlot:0}] run say you have the first inv slot selected
execute at @a[nbt={Inventory:[{id:"minecraft:arrow"}]}] run say you have an arrow somewhere in your inventory
execute at @a[nbt={Inventory:[{id:"minecraft:arrow",tag:{display:{Name:"{\"text\":\"aro\"}"}}}]}] run say you have the arrow named aro somewhere in your inv
execute at @a[nbt={Inventory:[{id:"minecraft:arrow",Slot:0b,tag:{display:{Name:"{\"text\":\"aro\"}"}}}]}] run say you have the arrow named aro in your first inv slot
execute at @a[nbt={SelectedItemSlot:0,Inventory:[{id:"minecraft:arrow",Slot:0b,tag:{display:{Name:"{\"text\":\"aro\"}"}}}]}] run say you have the arrow named aro in your first inv slot and you are currently holding it
execute at @p[x=9,y=69,z=289,distance=..2,nbt={SelectedItemSlot:0,Inventory:[{id:"minecraft:arrow",Slot:0b,tag:{display:{Name:"{\"text\":\"aro\"}"}}}]}] run say you have the arrow named aro in your first inv slot and you are holding it while standing within 2 blocks from the coords 9 69 289
I hope this will help others with formatting and command layout of the newer commands and the new testfor.
People, if you are having command-related trouble, please post a thread in the Commands, Command Blocks and Functions section. This thread is not the appropriate place for asking for command support.
People, this is not a thread for asking for assistance with the execute command. If you have a specific command you need assistance with, please post a thread in the Commands, Command Blocks and Functions section:
I see a lot has been happening here. I felt that I just had to share this to end the confusion...
I have created a 1.12 to 1.13 Command Converter that works very well if I do say so myself (I guess I beat MrGarretto to it ).
It converts a list of up to 1000 commands from a local text document, it converts them, and it exports them all to another local text document.
I noticed a few other command converters out there, but most of them cannot convert a lot of the commands that are so desperately needed to be converted. This thing here can convert any command in vanilla Minecraft! I have even used it to convert one-command machines!
If anyone here has a bunch of commands that they need to work in 1.13, consider this.
Well, since I posted this comment, I researched how to convert commands to /execute. But there is still big holes in my knowledge of 1.13 commands.
Minecraft Discord Server: https://discord.gg/FSfPgQ7
*Skilled at 1.12 command blocks
*Semi-skilled at 1.13 command blocks
*Good enough at redstone
*Average at building
*Legendary at giving up on a build or project because I forgot a command or just lose inspiration
The replacment for /testfor is something like this:
/execute if @p
It's not that hard. Put that in a repeating command block with a comparator on it you will get redstone signal out based on the number of qualifying entities found.
Try my Minecraft command generator mcstacker.net
Follow @PyroStunts on Twitter
Is there a way to teleport a player to a set of coords stored on the scoreboard?
i.e.
/execute as @p[scores={Home=1..}] positioned {"score":{"name":"@s","objective":"xPos"}} {"score":{"name":"@s","objective":"yPos"}} {"score":{"name":"@s","objective":"zPos"}} run teleport @s ~ ~ ~
-- My Server --
IP: templex.co
Name: Templex
I specialize in command blocks. So if you ever need a hand, just ask.
Here:
AKA Arctenik on some websites (or Zatnik, but I'm not the only Zatnik out there)
My texture pack on Planet Minecraft
How would i check nearest players inventory for specific item like blue banner id# 425:4 in a command block i had
testfor @p {inventory:[{id:minecraft:banner}]}
since testfor will not return the proper item regardless i want to know how the new code can condition and run a command upon seeing an item in the players slot.weapon.offhand or in their inventory at all? Innovation and simplicity is great and all but I'm becoming increasingly confused.
Hello, I am trying too test for a item in a chest with the execute command.
So far i have made it work if there is a chest it does what i want. My problem is too make it check for the NBT data.
im using this command right now:
what is my mistake the error says:
so i figure it is something with how i write the NBT data
any help would be appreciated.
okay after much distress and very little info on how to write a proper testfor command with execute, a holy knight finally arrived by the name of deimosbtg on reddit, he gave me the info i needed to finally figure out a few things.
here are some working examples of test for commands using execute
all are one looking for things on the player
execute if entity @p[nbt={SelectedItemSlot:0}] run say you have the first inv slot selected
execute at @a[nbt={Inventory:[{id:"minecraft:arrow"}]}] run say you have an arrow somewhere in your inventory
execute at @a[nbt={Inventory:[{id:"minecraft:arrow",tag:{display:{Name:"{\"text\":\"aro\"}"}}}]}] run say you have the arrow named aro somewhere in your inv
execute at @a[nbt={Inventory:[{id:"minecraft:arrow",Slot:0b,tag:{display:{Name:"{\"text\":\"aro\"}"}}}]}] run say you have the arrow named aro in your first inv slot
execute at @a[nbt={SelectedItemSlot:0,Inventory:[{id:"minecraft:arrow",Slot:0b,tag:{display:{Name:"{\"text\":\"aro\"}"}}}]}] run say you have the arrow named aro in your first inv slot and you are currently holding it
execute at @p[x=9,y=69,z=289,distance=..2,nbt={SelectedItemSlot:0,Inventory:[{id:"minecraft:arrow",Slot:0b,tag:{display:{Name:"{\"text\":\"aro\"}"}}}]}] run say you have the arrow named aro in your first inv slot and you are holding it while standing within 2 blocks from the coords 9 69 289
I hope this will help others with formatting and command layout of the newer commands and the new testfor.
People, if you are having command-related trouble, please post a thread in the Commands, Command Blocks and Functions section. This thread is not the appropriate place for asking for command support.
https://www.minecraftforum.net/forums/minecraft-java-edition/redstone-discussion-and/commands-command-blocks-and
- sunperp
Thank you for create this.
I don't approve of these changes, but it's not like I have the power to reverse them. I can always keep making maps in 1.12 as I learn the new system.
People, this is not a thread for asking for assistance with the execute command. If you have a specific command you need assistance with, please post a thread in the Commands, Command Blocks and Functions section:
https://www.minecraftforum.net/forums/minecraft-java-edition/redstone-discussion-and/commands-command-blocks-and
- sunperp
I see a lot has been happening here. I felt that I just had to share this to end the confusion...
I have created a 1.12 to 1.13 Command Converter that works very well if I do say so myself (I guess I beat MrGarretto to it ).
It converts a list of up to 1000 commands from a local text document, it converts them, and it exports them all to another local text document.
I noticed a few other command converters out there, but most of them cannot convert a lot of the commands that are so desperately needed to be converted. This thing here can convert any command in vanilla Minecraft! I have even used it to convert one-command machines!
If anyone here has a bunch of commands that they need to work in 1.13, consider this.
I hope this helps.
'Til next time!
But The shorter it is. the less lag it would cause.