Hi, I have red some information about this, but can't figure out how to succeed what I really want.
My goal is to be able to throw a specific weapon (a custom named bow or sword for example) into a hopper and doing this would trigger a redstone circuit.
I checked some sorter system, testfor commands or execute commands... I'm so confuse about this.
The fact that the weapons are non stackable is giving me a hard time to achieve this.
That would compare a block at 0 60 0 to a block at 10 60 10. Make sure the block is filled with the specific weapon you want at the 10 60 10 coordinate.
AFTER this put a chain command block on top of that command block set to "conditional" and "always active". In that command you can put whatever ypu want to happen next
That would compare a block at 0 60 0 to a block at 10 60 10. Make sure the block is filled with the specific weapon you want at the 10 60 10 coordinate.
AFTER this put a chain command block on top of that command block set to "conditional" and "always active". In that command you can put whatever ypu want to happen next
Thank you for your reply.
Sorry, but I'm not sure to understand.
0 60 0 is the coordinates where I got nothing there?
10 60 10 is the coordinates where I place my hopper?
Because I want the detection to be done via a hopper; when I throw the custom weapon in.
How many of that custom weapon should I put in the hopper before throwing the one that should trigger the chain command?
I'm very glad drhubs for your support, thank you again.
I got to admit that I don't really understand. I did try to build your idea.
But where do I throw my weapon?
Should I use a device that catch an item as the hopper do; instead of a device that push out an item as the dropper do?
But, I have to admit that I never use dropper. So, I'm not quite sure about its efficiency and how they really work.
My goal again is that the player needs to throw the custom named sword into a container (or device); and this action would trigger the other system (the lapis block (E) turning into a redstone block in this example above).
I use the hopper technique with stackable items (16 or 64) and it works well. But since the swords are non stackable, I cannot drop a sword (with a custom named, because that is what I need in my map) into the hopper like a bone or any other item that can be stacked.
This is how many of each stackable item I place inside the hopper as I learned in a youtube tutorial about item sorting:
emits a redstone signal of 2 blocks
emits a redstone signal of 2 blocks
emits a redstone signal of 3 blocks
So, when I add 1 firecharge or 1 ender pearl, my signal extands to 3 blocks and activates another system.
But what I do with the sword since it is non stackable?
I don't want the player to throw anything else than a sword with a custom name.
Those are the signals viewed from above (64-16-unstackable):
That's my problem in details. I'm stuck at this point.
So move that dropper down one and put the hopper you plan to throw your item in facing towards the dropper on top of it. The hopper will empty into the dropper and afterwards you want your comparator clock circuit to automatically power the dropper. All the dropper will do is spit out the sword immediately .
Now at A perform the following command
/execute @e[name=TNTQc,x=~,y=~,z=~,r=4] ~~~ setblock redstone_block 0 60 0
the 0 60 0 is where the lapiz lazuli output will be
the x=~,y=~,z=~ is going to be 1 block in front of your dropper
name=TNTQc is an example of the command you would run if you named your sword TNTQc (I don't actually recommend doing that though you might run into problems without more selectors)
Note - you might want to put a redstone repeater facing your comparator on your clock circuit to slow it down IF the dropper is not activating at that faster speed
Well, the comparator clock with the hopper and the dropper seem to work;
when I throw my sword (named "Blade"), the dropper spits it out. Without the addition of the repeater, it didn't work (too fast).
This is the command I put in the command block:
/execute @e[name=Blade,x=11,y=71,z=110,r=4] ~~~ setblock redstone_block 9 74 111
11 71 110 are the coordinates in front of the dropper (the lapis floor block);
9 74 111 are the coordinates of the lapis block linked to the lamp.
The lapis block don't change to a redstone block.
*** I want to add that I would like the player to be able to throw the sword named "Blade" in the hopper, and only this and nothing else.
What do you think?
**** I forgot to mention that my Minecraft version is 1.12.1. It might has something to do with it.
Try turning the command block to a repeating command block and activate it. Try again. Also turn on the command block output and see if that says anything.
Try turning the command block to a repeating command block and activate it. Try again. Also turn on the command block output and see if that says anything.
/execute as /execute as @e[name=Blade,type=item,x=11,y=71,z=110,r=4] at @s run setblock 9 74 111 redstone_block@e[name=Blade,type=item,x=11,y=71,z=110,r=4] at @s run setblock 9 74 111 redstone_block
I run it. It says: Entity 'as' cannot be found.
I run it without the 'as' and it says: Selector '@e[name=Blade,type=item,x=11,y=71,z=110,r=4]]' found nothing.
Hi, I have red some information about this, but can't figure out how to succeed what I really want.
My goal is to be able to throw a specific weapon (a custom named bow or sword for example) into a hopper and doing this would trigger a redstone circuit.
I checked some sorter system, testfor commands or execute commands... I'm so confuse about this.
The fact that the weapons are non stackable is giving me a hard time to achieve this.
Any help would be appreciated. Thank you.
If you don't mind doing commands try doing
/testforblocks 0 60 0 0 60 0 10 60 10
That would compare a block at 0 60 0 to a block at 10 60 10. Make sure the block is filled with the specific weapon you want at the 10 60 10 coordinate.
AFTER this put a chain command block on top of that command block set to "conditional" and "always active". In that command you can put whatever ypu want to happen next
Thank you for your reply.
Sorry, but I'm not sure to understand.
0 60 0 is the coordinates where I got nothing there?
10 60 10 is the coordinates where I place my hopper?
Because I want the detection to be done via a hopper; when I throw the custom weapon in.
How many of that custom weapon should I put in the hopper before throwing the one that should trigger the chain command?
A is the testforblocks command
B is the chain command (it sets the lapis block (E) into a redstone block to light up the lamp)
C is the first coordinate (nothing there)
D is the hopper where I want to throw my custom named weapon
** Thank you for your help. I need to go to work. When I come back, I will check again your suggestion.**
Thank you for going above and beyond it'll help solve your problem faster. I see the depth in your problem.
We are going to undo that testforblocks idea because while it would work it's not the easiest option for what you're specifically after.
I'm very glad drhubs for your support, thank you again.
I got to admit that I don't really understand. I did try to build your idea.
But where do I throw my weapon?
Should I use a device that catch an item as the hopper do; instead of a device that push out an item as the dropper do?
But, I have to admit that I never use dropper. So, I'm not quite sure about its efficiency and how they really work.
My goal again is that the player needs to throw the custom named sword into a container (or device); and this action would trigger the other system (the lapis block (E) turning into a redstone block in this example above).
I use the hopper technique with stackable items (16 or 64) and it works well. But since the swords are non stackable, I cannot drop a sword (with a custom named, because that is what I need in my map) into the hopper like a bone or any other item that can be stacked.
This is how many of each stackable item I place inside the hopper as I learned in a youtube tutorial about item sorting:
emits a redstone signal of 2 blocks
emits a redstone signal of 2 blocks
emits a redstone signal of 3 blocks
So, when I add 1 firecharge or 1 ender pearl, my signal extands to 3 blocks and activates another system.
But what I do with the sword since it is non stackable?
I don't want the player to throw anything else than a sword with a custom name.
Those are the signals viewed from above (64-16-unstackable):
That's my problem in details. I'm stuck at this point.
So move that dropper down one and put the hopper you plan to throw your item in facing towards the dropper on top of it. The hopper will empty into the dropper and afterwards you want your comparator clock circuit to automatically power the dropper. All the dropper will do is spit out the sword immediately .
Now at A perform the following command
/execute @e[name=TNTQc,x=~,y=~,z=~,r=4] ~~~ setblock redstone_block 0 60 0
the 0 60 0 is where the lapiz lazuli output will be
the x=~,y=~,z=~ is going to be 1 block in front of your dropper
name=TNTQc is an example of the command you would run if you named your sword TNTQc (I don't actually recommend doing that though you might run into problems without more selectors)
Note - you might want to put a redstone repeater facing your comparator on your clock circuit to slow it down IF the dropper is not activating at that faster speed
Well, the comparator clock with the hopper and the dropper seem to work;
when I throw my sword (named "Blade"), the dropper spits it out. Without the addition of the repeater, it didn't work (too fast).
This is the command I put in the command block:
/execute @e[name=Blade,x=11,y=71,z=110,r=4] ~~~ setblock redstone_block 9 74 111
11 71 110 are the coordinates in front of the dropper (the lapis floor block);
9 74 111 are the coordinates of the lapis block linked to the lamp.
The lapis block don't change to a redstone block.
*** I want to add that I would like the player to be able to throw the sword named "Blade" in the hopper, and only this and nothing else.
What do you think?
**** I forgot to mention that my Minecraft version is 1.12.1. It might has something to do with it.
Try turning the command block to a repeating command block and activate it. Try again. Also turn on the command block output and see if that says anything.
Also try
/execute @e[name=Blade,type=item,x=11,y=71,z=110,r=4] ~~~ setblock 9 74 111 redstone_block
I think the execute command was incorrect
You are on Bedrock correct?
no, I'm on Java Edition
Ok well the system still works but we have to format the execute command correctly.
I think it's something like
/execute as @e[name=Blade,type=item,x=11,y=71,z=110,r=4] at @s run setblock 9 74 111 redstone_block
You can find a good source for how to write other execute commands here
https://www.minecraftforum.net/forums/minecraft-java-edition/recent-updates-and-snapshots/2844075-how-to-use-the-execute-replacement-commands-for-1
I changed the syntax of the command like you mentioned.
I tried with an impulse command block and a repeater command block without success.
I placed a redstone repeater out from the command block (for the output testing).
I throw the "Blade" sword in it and it spits out, but I don't see any signal out from the command block.
I'm wondering also if it should be ~ ~ ~ instead of ~~~ (in the command).
But I tried both without difference.
Run the
/execute as @e[name=Blade,type=item,x=11,y=71,z=110,r=4] at @s run setblock 9 74 111 redstone_block
I run it. It says: Entity 'as' cannot be found.
I run it without the 'as' and it says: Selector '@e[name=Blade,type=item,x=11,y=71,z=110,r=4]]' found nothing.
And I was wondering what is "@s"
@s should be the item itself. The item is out on the ground when you run the command correct?
Yes. I retried to make sure.
The item is on the ground when I tried the command (without the "as" in the chat menu (console).
it says again: Selector '@e[name=Blade,type=item,x=11,y=71,z=110,r=4]]' found nothing.
I also tried again twice via the command block;
1. impulse-needs redstone
2. repeat-always active
It still didn't work.
You tried the command with the As with the item on the ground.
try doing
/tag @e[name=Blade,type=item,x=11,y=71,z=110,r=4] add Blade
/execute as @e[tag=Blade,x=11,y=71,z=110,r=4] at @s run setblock 9 74 111 redstone_block
Please make sure the syntax for Tag is the same in Java. Hopefully we can just address it by tag
EDIT Sorry don't forget redstone_block at the end
I upgraded my game at 1.14.4 (latest) because I didn't have the "tag command" in 1.12.1.
The item is on the ground in front of the dropper. I run the command and it says: unknown option 'r'.
For the syntax of "Tag", I have this reference:
https://www.digminecraft.com/game_commands/tag_command.php
But I'm really not good at these (scoreboards, tags, etc)
Ok, I retry with adding "redstone_block" at the end, but it still not functionning.
I just want to make sure now in the tests:
Do you want me to leave the sword in front of the dropper and then execute the command in the chat menu?
Am I ok with doing those tests in minecraft version 1.14.4 or should I try with another version?
which command said that about r? radius is stil a selector in Java correct?