1

I'm trying to create a MineCraft minigame for practise with command blocks, and I don't know how to place a block under a specific person with specific conditions. The conditions varying based on what team they are on.

I have:

Repeating

Chain

execute @a[team=red] ~ ~ ~ testforblock ~ ~-1 ~ concrete 0

Conditional Chain

execute @a[team=red] ~ ~ ~ setblock ~ ~-1 ~ concrete 14

I'm quite sure the way it is set up now whenever any red team member stands on white concrete, red concrete is placed below all of them. I can fix this, with it always placing red concrete below them, but then they break it when they jump. I'm also thinking of giving them points when they replace white or blue concrete, so I need to at least know how to update the score of a specific player on a team.

For now I am going to make each team hold 1 player, and the score held for the whole team.

3

/testfor is rarely used nowadays, because there are better ways:

/execute at @a[team=red] run fill ~ ~-1 ~ ~ ~-1 ~ red_concrete replace white_concrete
  • For your score plans, I recommend you to look at the /stats command. If you don't want to hassle with learning this complicated command shortly before it gets replaced, you can make your map for 1.13, which has the execute store command. But careful, the current 1.13 snapshots are a pretty unstable and laggy and you'll have to update most of your other commands. – Fabian Röling Jan 4 '18 at 7:23
  • Archive: minecraft.gamepedia.com/… – Fabian Röling Apr 30 '18 at 12:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.