0

I'm trying to make a countdown called "Preparation", showing the seconds before game starts. In order to do that I created a team, "P" and joined a horse with custom name "TimeRemaining" and an objective called Preparation, setting the horse's score every second, so the sidebar would look like this:

Preparation (objective)

Time Remaining 60 (Seconds based on the horse's score)

But it instead uses the hexadecimal UUID of the horse looking like this:

Preparation

uuu-00045634534547dhninqw843 60

Is there any way to force Minecraft using the customName, or an alternative way to represent the countdown?

0

You will need to use a fake player rather than an entity with a custom name.

To set:

/scoreboard players set TimeRemaining Preparation 10

To add/remove:

/scoreboard players remove TimeRemaining Preparation 1
/scoreboard players add TimeRemaining Preparation 1

To test for a value range:

/scoreboard players test TimeRemaining Preparation 0 5
  • how do I set a fake player? – Lionitow Sep 7 '15 at 17:50
  • @Lionitow First command in this answer – SirBenet Sep 7 '15 at 18:27
  • it works, but can I apply a selector like: /scoreboard players remove TimeRemaing[score_min=1] Preparation 1 ? I need the score to never go negative – Lionitow Sep 7 '15 at 18:45
  • @Lionitow You can't use selector arguments, as selectors only target existing entities. Instead, test that the value is above 0 like this: /scoreboard players test TimeRemaining Preparation 0, and then use the SuccessCount of that command (comparator, /stats, conditional chain, whatever) to only decrease the score if the test command succeeded. You could also have the fake player score as only the display, and constantly set it to the actual score which is on a real entity (probably best practice prior to 1.9 snapshots). – SirBenet Sep 7 '15 at 19:03
  • Fine, I didn't know about that players test. Very useful. – Lionitow Sep 8 '15 at 9:01
-1

Armor stands and snowballs and non AI entities are the only mobs that show their name not a UUID, I suggest you use Armor stand instead of a horse to do this.

Also make sure your in 1.9 before 1.9 Entities could not join teams.

  • ArmorStands will still show their UUID, and entities could join teams before 1.9. – SirBenet Sep 7 '15 at 17:02

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.