»Anyone here pro at command blocks? Maybe some help :)

Discussion in 'Off-Topic' started by IcyTea, Dec 21, 2015.

  1. Mother

    Mother Faithful Poster Member

    Messages:
    605
    Ratings:
    +224 / -0
    Soga, Is there any way to detect specific blocks? For example, I placed an oak wood and the block detector detected it, and it activated a command. But when I place any other block except oak wood, nothing is going to happen.
     
    #21
  2. Soga

    Soga Forum Guru Member

    Messages:
    2,063
    Ratings:
    +639 / -0
    One block area or large area?
     
    #22
  3. Mother

    Mother Faithful Poster Member

    Messages:
    605
    Ratings:
    +224 / -0
    uhm, just one block, I can make proximity detector to make it large :D
     
    #23
  4. Soga

    Soga Forum Guru Member

    Messages:
    2,063
    Ratings:
    +639 / -0
    Ok, you can detect a block pretty easily :)
    Write /testforblock <x> <y> <z> <block name> to command block.
    For example, /testforblock 813 68 134 planks
    Then put redstone comparator next to command block.
    NOTE: Redstone comparator output is 1, so put repeater.
    [​IMG]
     
    #24
  5. ServerMask

    ServerMask Quick Digit Member

    Messages:
    285
    Ratings:
    +35 / -0
    I'm good at command blocks, but it's impossible unless you stand on top of every block you place. You can do /execute ~ ~-1 ~ (Block) 0 /(Comand)
     
    #25
  6. Soga

    Soga Forum Guru Member

    Messages:
    2,063
    Ratings:
    +639 / -0
    /testforblock...
     
    #26
  7. ServerMask

    ServerMask Quick Digit Member

    Messages:
    285
    Ratings:
    +35 / -0
    If you use testforblock you need 2 commands, but if you use execute it's just one command block.
     
    #27
  8. Mother

    Mother Faithful Poster Member

    Messages:
    605
    Ratings:
    +224 / -0
    2015-12-24_17.01.59.png
    Oh, okay, now I get it.
    I added a redstone clock to make the command alive :D
     
    Last edited: Dec 24, 2015
    #28
  9. Soga

    Soga Forum Guru Member

    Messages:
    2,063
    Ratings:
    +639 / -0
    I know. But I think he wants to detect a block in the area, not under the player.

    :D
     
    #29
  10. Mother

    Mother Faithful Poster Member

    Messages:
    605
    Ratings:
    +224 / -0
    @Soga btw, have you seen my Flora kit suggestion?. I want to create that kit using command blocks. The specific flowers can emit potion effects at a certain block radius, is that possible? Uhm I made one with player proximity detector and it worked, even without the flower. But I want to activate the command only if the flower is planted, and it will not work if the flower gets removed
     
    #30
  11. Soga

    Soga Forum Guru Member

    Messages:
    2,063
    Ratings:
    +639 / -0
     
    #30
  12. Mother

    Mother Faithful Poster Member

    Messages:
    605
    Ratings:
    +224 / -0
    OMG, lemme get the map :D
     
    #31
  13. Soga

    Soga Forum Guru Member

    Messages:
    2,063
    Ratings:
    +639 / -0
    #32
  14. Emmanuel

    Emmanuel Quick Digit Member

    Messages:
    205
    Ratings:
    +45 / -0
    well, idk too much about command blocks but this guy may know a lot:
     
    #33

Share This Page