• 0

    posted a message on Detect a specific unstackable item/weapon
    Quote from drhubs»

    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).

    Posted in: Redstone, Commands and Mechanisms
  • 0

    posted a message on Detect a specific unstackable item/weapon

    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!

    Posted in: Redstone, Commands and Mechanisms
  • 0

    posted a message on Detect a specific unstackable item/weapon
    Quote from drhubs»

    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?

    Posted in: Redstone, Commands and Mechanisms
  • 0

    posted a message on Detect a specific unstackable item/weapon

    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!

    Posted in: Redstone, Commands and Mechanisms
  • 0

    posted a message on Detect a specific unstackable item/weapon
    Quote from drhubs»

    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

    Posted in: Redstone, Commands and Mechanisms
  • 0

    posted a message on Detect a specific unstackable item/weapon

    If the swords were stackable, none of this would be the problem.


    Is there any way to stack swords?

    Quote from drhubs»

    did you try running


    /execute as @e[name=Blade] run say hello


    I tried.

    I doesn't run the say command.

    Posted in: Redstone, Commands and Mechanisms
  • 0

    posted a message on Detect a specific unstackable item/weapon
    Quote from drhubs»

    try doing


    /execute as @e[name=Blade] run setblock 9 74 111 minecraft:redstone_block


    I thought it was it, but no... same nothing

    Posted in: Redstone, Commands and Mechanisms
  • 0

    posted a message on Detect a specific unstackable item/weapon
    Quote from drhubs»

    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



    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"

    Posted in: Redstone, Commands and Mechanisms
  • 0

    posted a message on Detect a specific unstackable item/weapon
    Quote from drhubs»

    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.

    Posted in: Redstone, Commands and Mechanisms
  • 0

    posted a message on Detect a specific unstackable item/weapon
    Quote from drhubs»

    does the chat give you an error?



    lets see if your selectors are ruining it. Try Running;

    /execute as @e[name=Blade] at @s run setblock 9 74 111 redstone_block


    nothing

    Quote from drhubs»

    Try running


    /execute at @e[name=Blade] run setblock 9 74 111 redstone_block


    if that doesn't work try


    /execute as @e[name=Blade] at @s run setblock 9 74 111 redstone_block


    nothing on both attempt

    Posted in: Redstone, Commands and Mechanisms
  • 0

    posted a message on Detect a specific unstackable item/weapon
    Quote from drhubs»

    does the chat give you an error?


    no, nothing

    Posted in: Redstone, Commands and Mechanisms
  • 0

    posted a message on Detect a specific unstackable item/weapon

    Ok, I throw the sword on the lapis block in front of the dropper.

    Then, I execute the command in the chat.

    Nothing happens


    11 71 110 are the coordinates of the lapis block in question.


    And the other coordinates is good.

    Posted in: Redstone, Commands and Mechanisms
  • 0

    posted a message on Detect a specific unstackable item/weapon
    Quote from drhubs»

    try

    /execute as @e[name=Blade,x=11,y=71,z=110,distance=..4] at @s run setblock 9 74 111 redstone_block


    Your item is named Blade correct?

    im curious, try throwing the blade from your inventory instead of the dropper and running those commands




    Ok, I'll do, but can you just remind me of the kind of command blocks I need and how to place them.. I messed a bit and I'm quite lost now.


    1. impulse/need redstone.. is this one conditional or unconditional?

    2. repeater/always active... unconditional?


    And the fist picture I've showed you... is this the repeater one on top of the impulse one?


    And yes, "Blade" is the name of the sword in question.

    Posted in: Redstone, Commands and Mechanisms
  • 0

    posted a message on Detect a specific unstackable item/weapon
    Quote from drhubs»

    K now put a button towards that impulse CB.


    also your arrows have to be pointing at the next command block in the chain. So I would move your top command block so it's in front of the impulse command blocks arrow. Then I would put a button on the impulse command block. After you throw in the item. Press the button



    I would even just activate each command separately by my chat, in order, just to see if it works



    Oh!!
    Now whan I press the button, I see clearly the signals going in the repeater.

    But my lapis block desn't change.

    I guess that I only have to place a setblock command in the second Command block?


    But what about the button? I don't want the player to press abutton.

    Should I now add a similar comparator clock linked to the first command block?

    What do you think?


    ** I didn't see this part of your reply while I was answering:

    I would even just activate each command separately by my chat, in order, just to see if it works

    Quote from drhubs»

    K now put a button towards that impulse CB.


    also your arrows have to be pointing at the next command block in the chain. So I would move your top command block so it's in front of the impulse command blocks arrow. Then I would put a button on the impulse command block. After you throw in the item. Press the button



    I would even just activate each command separately by my chat, in order, just to see if it works


    Even if my sword is on the ground, it says "No Entity Found" when I execute both commands in the chat.

    Posted in: Redstone, Commands and Mechanisms
  • 0

    posted a message on Detect a specific unstackable item/weapon

    This is what it looks like now:



    The sword is ejected on the diamond block.

    Quote from drhubs»

    can you turn on your command block output and tell me what that says?


    You can see the sword is ejected on the diamond block.

    I attached a repeater and a redstone dust on the first command block and there's no signal!



    Posted in: Redstone, Commands and Mechanisms
  • To post a comment, please .