From 0a4416381bf1a0b84b151ac411bcfb62083949e8 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Fri, 27 Nov 2015 15:55:02 +1300 Subject: [PATCH] Fix guardian --- .../disguise/disguises/DisguiseGuardian.java | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/disguise/disguises/DisguiseGuardian.java b/Plugins/Mineplex.Core/src/mineplex/core/disguise/disguises/DisguiseGuardian.java index 808c60efc..9f527874b 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/disguise/disguises/DisguiseGuardian.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/disguise/disguises/DisguiseGuardian.java @@ -8,16 +8,24 @@ public class DisguiseGuardian extends DisguiseCreature { super(EntityType.GUARDIAN, entity); } - + public void setElder(boolean elder) { - //data stuff + DataWatcher.watch(16, Integer.valueOf(DataWatcher.getInt(16) | 4)); } - + public boolean isElder() { - //return DataWatcher.getByte(13); - - return false; + return (this.DataWatcher.getInt(16) & 4) != 0; + } + + protected String getHurtSound() + { + if (isElder()) + { + return "mob.guardian.elder.hit"; + } + + return "mob.guardian.hit"; } }