I need help with /execute

I need help with /execute - High angle of crop person holding hands with ethnic boy stuck in dirty puddle in poor village

I am trying to use the /execute and detect air below the player and set the block to a barrier block and the destroy it one second later. in doing this I am trying to make a double jump mechanism but a the moment the commands are in separate blocks using comparators and repeaters this is fine on single player but not multiplayer friendly. I did some research and I got this:

/execute @e[type=Player] ~ ~ ~ detect ~ ~-2 ~ air 1 fill ~-2 ~-1 ~-2 ~1 ~-1 ~1 barrier destroy 0

But, this doesn't work and it comes up with

[11:52:19] Failed to execute 'detect' as mr_assley19

If anyone could come up with any alternatives or how to fix the command that I've tried, then that would be great!



Best Answer

To fix the command:

  • @e[type=Player] can just be @a
  • There is no air with a data value of 1, so the detect will never succeed; it should be 0
  • The data value in /fill should come before the old block handling mode

So your command should be:

execute @a ~ ~ ~ detect ~ ~-2 ~ air 0 fill ~-2 ~-1 ~-2 ~1 ~-1 ~1 barrier 0 destroy

I'm not sure if this really does what you want it to though. There is no way to execute two separate commands in a command block, nor is there any way to have a delay in a single block.




Pictures about "I need help with /execute"

I need help with /execute - Frustrated female driver in white t shirt and jeans sitting on ground near damaged car with hands on head during car travel in sunny summer day
I need help with /execute - Homeless people in night shelter for homeless
I need help with /execute - Black and white of homeless man lying on floor and reading book in night shelter for homeless



How do I get better at execution?

How to improve your execution skills
  • Create a plan. You can create a plan for yourself or your team to improve your execution skills. ...
  • Set goals. ...
  • Encourage teamwork. ...
  • Resolve conflicts. ...
  • Hold yourself accountable. ...
  • Provide resources. ...
  • Give feedback.


  • How do you execute something?

    How to execute an effective plan
  • Gather information. Before you can begin developing a successful plan, you need to make sure you have all the information necessary. ...
  • Identify key resources. ...
  • Develop SMART goals. ...
  • Create the framework. ...
  • Assign tasks. ...
  • Establish regular communication. ...
  • Track your progress. ...
  • Evaluate performance.


  • Is execution a skill?

    Most people recognize that execution is a critical skill and strive to perform it well, but they may a) underestimate how important it is to their career advancement or b) not realize that you can improve on execution without working longer hours.

    What is ability to execute?

    Rooted in the latest thinking in behavioral science, Ability to Execute is a suite of programs designed to build individual capabilities to drive and sustain transformational change at scale.



    Someone help with execute please?




    More answers regarding i need help with /execute

    Answer 2

    Detect syntax:

        /detect <x1> <y1> <z1> <x2> <y2> <z2> <TileName> <dataValue>
    

    The detect command needs block datavalue as well as the ID for the block. The only valid metadata for air is 0. 1 will cause the detect to always return false because minecraft cannot find air with datavalue 1.

    Fill syntax:

        /fill <x1> <y1> <z1> <x2> <y2> <z2> <TileName> [dataValue] [oldBlockHandling] [dataTag]
    

    For the fill command, you just mixed up the dataValue and oldBlockHandling.

    Final command should be:

        /execute @e[type=Player] ~ ~ ~ detect ~ ~-2 ~ air 0 fill ~-2 ~-1 ~-2 ~1 ~-1 ~1 barrier 0 destroy
    

    Answer 3

    Scoreboard Setup:

    /scoreboard objectives add LivingTime dummy
    

    Inside of a fast clock (20 times per second clock):

    /execute @a ~ ~ ~ detect ~ ~-2 ~ air 0 summon ArmorStand ~ ~ ~ {CustomName:"Target", Marker:1, Invisible:1}
    /execute @e[type=ArmorStand,name=Target] fill ~-2 ~-1 ~-2 ~1 ~-1 ~1 barrier 0 destroy
    /scoreboard players add @e[type=ArmorStand,name=Target] LivingTime 1
    /execute @e[type=ArmorStand,name=Target,score_LivingTime_min=20] fill ~-2 ~-1 ~-2 ~1 ~-1 ~1 air 0 destroy
    /kill @e[type=ArmorStand,name=Target,score_LivingTime_min=20]
    

    The first command (ignoring the setup command) summons an armor stand with a custom name of Target at every player who has a air block 2 blocks below them. The next command fills the area 2 blocks below every armor stand that has a custom name of Target. In the third command, the LivingTime for every armor stand is incremented and when LivingTime is at least 20, the area 2 blocks below is replaced by air and the armor stand is killed, removing its LivingTime.

    Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

    Images: Ahmed akacha, Gustavo Fring, Plato Terentev, Plato Terentev