Fix guardian

This commit is contained in:
libraryaddict 2015-11-27 15:55:02 +13:00
parent 98d988584d
commit 0a4416381b

View File

@ -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";
}
}