1

I want to award the players in my game with 2 cooked porkchops every time they kill another player.

What I have tried so far, is setup one command block which gives every player with the killsloot scoreboard objective 2 porkschops, and setup another one which removes one from the killsloot scoreboard objective for all players for whom the objective is higher than one. The killsloot objective tracks kills.

The command blocks have the following commands, from left to right:

  • /give @a[score_killsloot_min=1] minecraft:cooked_porkchop 2
  • /scoreboard players remove @a[score_killsloot_min=1] killsloot 1

This does not seem to work however. Minecraft seems to remove the kills from the objective before it gives the item, and as a result, I receive no items. I can confirm this by, when I give myself a killsloot count of two, it runs the give command once, and when I give myself a killsloot count of three, it runs the give command twice.

I have tried swithing the command blocks in position, but that did not seem to change the order the command are run in.

setup

How do I give a player two porkchop for every kill they get? I am on Minecraft version 1.8.

I would like to point out this question is not a duplicate of gaming.stackexchange.com/questions/194564/…, as it does not ask for a progressive award system, and the difference in how its achieved is quite significant.

  • 6
    I would like to point out this question is not a duplicate of gaming.stackexchange.com/questions/194564/…, as it does not ask for a progressive award system, and the difference in how its achieved is quite significant. – Jeroen Bollen Dec 31 '15 at 2:55
  • You're more of a "Why is this not working?" – aytimothy Dec 31 '15 at 3:42
  • @aytimothy Not really. I care more about how to do it then about why this isn't working. – Jeroen Bollen Dec 31 '15 at 22:21
  • Oh ok. Then you're a dupe.. – aytimothy Dec 31 '15 at 22:22
  • 1
    I don't believe it's a dupe. The other is just asking how to give items at a specific kill quota. This one is asking how to give said item, and then remove it for the next one. This seems like a fine quesiton, especially with the amount of effort shown. – Frank Jan 1 '16 at 8:00
5

The activation order does matter and is what's causing the problem. However, activation order via redstone dust does not follow a pattern nor is the order it activates guaranteed to be constant. You would be better off adding delay between the two commands or using a more reliable activation method such as a /fill clock.

Image example of activation order from a /fill clock:

Update order

Source & tutorial

In 1.9, you can simply use chained command blocks to directly specify the order commands are activated, so as to not rely on unreliable and directional methods.

  • Nice answer! The reason I didn't add a delay is because then it'd be completely random whether the player would receive an award or not. The player could gain a kill during the delay. – Jeroen Bollen Dec 31 '15 at 15:08

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.