From 803470a76b785488a09bb131534543efe0758f8f Mon Sep 17 00:00:00 2001 From: Charlie Wang Date: Sun, 30 Jun 2013 16:44:22 -0400 Subject: [PATCH] Added random sheep colour upon spawn --- src/gibstick/bukkit/discosheep/DiscoSheep.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gibstick/bukkit/discosheep/DiscoSheep.java b/src/gibstick/bukkit/discosheep/DiscoSheep.java index 514a963..295620f 100644 --- a/src/gibstick/bukkit/discosheep/DiscoSheep.java +++ b/src/gibstick/bukkit/discosheep/DiscoSheep.java @@ -50,6 +50,7 @@ public final class DiscoSheep extends JavaPlugin { Sheep newSheep = (Sheep) world.spawnEntity(loc, EntityType.SHEEP); newSheep.setMaxHealth(10000); newSheep.setHealth(10000); + newSheep.setColor(discoColours[(int) Math.random() * discoColours.length]); getSheep().add(newSheep); }