Ok so I literally downloaded Java to figure this out. This was a challenge but I think we are on our way. All the previous commands I suggested did not work as well so I found this one. I hope it works for you (I am extremely confident that it will)
/execute at @e[type=minecraft:item,nbt={Item:{tag:{display:{Name:"{\"text\":\"Blade\"}"}}}}] run setblock 9 74 111 minecraft:redstone_block
This worked for me.
IF this works for you then I would try running
/execute at @e[type=minecraft:item,x=11,y=71,z=110,distance=..2,nbt={Item:{tag:{display:{Name:"{\"text\":\"Blade\"}"}}}}] run setblock 9 74 111 minecraft:redstone_block
Ok so I literally downloaded Java to figure this out. This was a challenge but I think we are on our way. All the previous commands I suggested did not work as well so I found this one. I hope it works for you (I am extremely confident that it will)
/execute at @e[type=minecraft:item,nbt={Item:{tag:{display:{Name:"{\"text\":\"Blade\"}"}}}}] run setblock 9 74 111 minecraft:redstone_block
This worked for me.
IF this works for you then I would try running
/execute at @e[type=minecraft:item,x=11,y=71,z=110,distance=..2,nbt={Item:{tag:{display:{Name:"{\"text\":\"Blade\"}"}}}}] run setblock 9 74 111 minecraft:redstone_block
WOW!!
You sir are a genius!!
I did work (on the chat)!
I put the command into the command block. I set the command block at "repeater/always active"
Do you need to get the item back or is it ok if it gets destroyed?
and yes turn that repeating command block to always active. As a note, repeating command blocks can introduce lag so if Java can slow down how many times they repeat OR have it so you set the repeating command block to "needs redstone" and have a lever or button activate that. BUT one of these probably isn't going to lag your world so I would leave it always active
Also it might not hurt to do it a couple hoppers high in your final build. That way it doesn't accidentally detect "Blade" above ground and mess anything up.
yeah and if you do r=2 that's fine. I'm hoping the NBT works the same even in 1.12 but if not I can probably find the syntax for 1.12. In Bedrock I liked that they let commands keep working until you open up the command block and update it. Which means old syntaxes will run but if you go digging around you'll likely have to update what you're doing. Java seems like it's changed so much in such a short time though
Do you need to get the item back or is it ok if it gets destroyed?
and yes turn that repeating command block to always active. As a note, repeating command blocks can introduce lag so if Java can slow down how many times they repeat OR have it so you set the repeating command block to "needs redstone" and have a lever or button activate that. BUT one of these probably isn't going to lag your world so I would leave it always active
Also it might not hurt to do it a couple hoppers high in your final build. That way it doesn't accidentally detect "Blade" above ground and mess anything up.
Actually, I don't mind what happen to the item once it is thrown in the hopper.
The redstone block is created just after and it triggers my other system.
I will check if I have lag issue. I think it will be fine.
And yes, adding more hoppers would be a good idea, I agree.
I will maybe adjust the distance in the command. But in my map, only one item will be called "Blade" (this is an example, I might put something else according to my storyline).
Ok sounds good. If it's a once occurrence thing that works. I was wondering if it was multiple because if so I would run a kill command to get rid of it but if that's not really the case I'd just leave it how it is
nothing
nothing on both attempt
Does the command go through if it doesn't give you an error?
Well, nothing happens; no error, no lapis block changing to redstone block.
can you run this in chat
/execute at @e[name=Blade] run setblock 9 74 111 redstone_block
then send me a screen shot
also just curious, try running this;
/execute at @e[name=Blade] run say hello
also
/execute as @e[name=Blade] run say hello
So I copy/paste the command in the chat menu as you can see:
And nothing happens (even if my sword is down there:
And I'm certain that the sword there is named "Blade"
try doing
/execute as @e[name=Blade] run setblock 9 74 111 minecraft:redstone_block
I thought it was it, but no... same nothing
did you try running
/execute as @e[name=Blade] run say hello
If the swords were stackable, none of this would be the problem.
Is there any way to stack swords?
I tried.
I doesn't run the say command.
Not that I know of. I just don't get why this isn't working. It really was supposed to be the simplest way lol...
let me know if that command does anything
did you try
/execute at @e[name=Blade] run say hello
No, it did not do anything
I will need to go on personal duties.
If you ever find something else; maybe another system.
All I need is to place a named sword somewhere to trigger a signal.
I got to say sincerely:
Thank you so much for all the time you gave me on my issue.
I really appreciate your efforts. Thousand thanks to you drhubs!
ok I might have to do it via nbt 1 sec
Ok so I literally downloaded Java to figure this out. This was a challenge but I think we are on our way. All the previous commands I suggested did not work as well so I found this one. I hope it works for you (I am extremely confident that it will)
/execute at @e[type=minecraft:item,nbt={Item:{tag:{display:{Name:"{\"text\":\"Blade\"}"}}}}] run setblock 9 74 111 minecraft:redstone_block
This worked for me.
IF this works for you then I would try running
/execute at @e[type=minecraft:item,x=11,y=71,z=110,distance=..2,nbt={Item:{tag:{display:{Name:"{\"text\":\"Blade\"}"}}}}] run setblock 9 74 111 minecraft:redstone_block
WOW!!
You sir are a genius!!
I did work (on the chat)!
I put the command into the command block. I set the command block at "repeater/always active"
Is it the best way to detect it?
Do you need to get the item back or is it ok if it gets destroyed?
and yes turn that repeating command block to always active. As a note, repeating command blocks can introduce lag so if Java can slow down how many times they repeat OR have it so you set the repeating command block to "needs redstone" and have a lever or button activate that. BUT one of these probably isn't going to lag your world so I would leave it always active
Also it might not hurt to do it a couple hoppers high in your final build. That way it doesn't accidentally detect "Blade" above ground and mess anything up.
If I want to return to 1.12 version, I guess I'd have to change the distance to radius?
And maybe some of the item IDs?
Because all my systems are running in minecraft 1.12.1. Otherwise, I guess I can change them to the latest version.
I hope they don't change all the syntax again in the future; I don't like this fact with Minecraft.
Everything is changing as a new version comes.
Personally, when I build my map (when terraforming), I use my old 1.2.5 version with spc/worldedit and all my keyboard shortcuts.
But I will have to add all my command block systems after. It's painful! hehe!
I got to thank you for all this; you are surely helping me to make my project go further. Thank you drhubs!
yeah and if you do r=2 that's fine. I'm hoping the NBT works the same even in 1.12 but if not I can probably find the syntax for 1.12. In Bedrock I liked that they let commands keep working until you open up the command block and update it. Which means old syntaxes will run but if you go digging around you'll likely have to update what you're doing. Java seems like it's changed so much in such a short time though
Actually, I don't mind what happen to the item once it is thrown in the hopper.
The redstone block is created just after and it triggers my other system.
I will check if I have lag issue. I think it will be fine.
And yes, adding more hoppers would be a good idea, I agree.
I will maybe adjust the distance in the command. But in my map, only one item will be called "Blade" (this is an example, I might put something else according to my storyline).
Ok sounds good. If it's a once occurrence thing that works. I was wondering if it was multiple because if so I would run a kill command to get rid of it but if that's not really the case I'd just leave it how it is