From d4774aa3c5ba8cf3d9f94103836eb59065b0b651 Mon Sep 17 00:00:00 2001 From: Andrew Date: Mon, 18 Nov 2013 04:39:33 +1300 Subject: [PATCH] Add reminder, make the horse color random per the color length --- src/me/libraryaddict/disguise/disguisetypes/Disguise.java | 2 ++ .../disguise/disguisetypes/watchers/HorseWatcher.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/me/libraryaddict/disguise/disguisetypes/Disguise.java b/src/me/libraryaddict/disguise/disguisetypes/Disguise.java index 0ad371d7..f4b16c06 100644 --- a/src/me/libraryaddict/disguise/disguisetypes/Disguise.java +++ b/src/me/libraryaddict/disguise/disguisetypes/Disguise.java @@ -90,6 +90,8 @@ public abstract class Disguise { // Else if its a horse. Set the horse watcher type else if (getWatcher() instanceof HorseWatcher) { try { + // Don't mess with this because Varient is something like ZombieHorse and so on. + // Not something that a watcher needs to access. Variant horseType = Variant.valueOf(getType().name()); getWatcher().setValue(19, (byte) horseType.ordinal()); } catch (Exception ex) { diff --git a/src/me/libraryaddict/disguise/disguisetypes/watchers/HorseWatcher.java b/src/me/libraryaddict/disguise/disguisetypes/watchers/HorseWatcher.java index edb09f8c..f8782cf9 100644 --- a/src/me/libraryaddict/disguise/disguisetypes/watchers/HorseWatcher.java +++ b/src/me/libraryaddict/disguise/disguisetypes/watchers/HorseWatcher.java @@ -11,7 +11,7 @@ public class HorseWatcher extends AgeableWatcher { public HorseWatcher(Disguise disguise) { super(disguise); - setValue(20, new Random().nextInt(7)); + setColorId(new Random().nextInt(Color.values().length)); } public Color getColor() {