diff --git a/src/main/java/me/libraryaddict/disguise/disguisetypes/watchers/EndermanWatcher.java b/src/main/java/me/libraryaddict/disguise/disguisetypes/watchers/EndermanWatcher.java index 92a03adb..58ca207e 100644 --- a/src/main/java/me/libraryaddict/disguise/disguisetypes/watchers/EndermanWatcher.java +++ b/src/main/java/me/libraryaddict/disguise/disguisetypes/watchers/EndermanWatcher.java @@ -20,10 +20,7 @@ public class EndermanWatcher extends InsentientWatcher { if (value.isPresent()) { WrappedBlockData pair = value.get(); - Material id = pair.getType(); - int data = pair.getData(); - - return new ItemStack(id, 1, (short) data); + return new ItemStack(pair.getType(), 1); } else { return null; } @@ -31,24 +28,25 @@ public class EndermanWatcher extends InsentientWatcher { @Override public void setItemInMainHand(ItemStack itemstack) { - setItemInMainHand(itemstack.getType(), itemstack.getDurability()); + setItemInMainHand(itemstack.getType()); } public void setItemInMainHand(Material type) { - setItemInMainHand(type, 0); - } - - public void setItemInMainHand(Material type, int data) { Optional optional; if (type == null) optional = Optional.empty(); else - optional = Optional.of(WrappedBlockData.createData(type, data)); + optional = Optional.of(WrappedBlockData.createData(type)); setData(MetaIndex.ENDERMAN_ITEM, optional); } + @Deprecated + public void setItemInMainHand(Material type, int data) { + setItemInMainHand(type); + } + public boolean isAggressive() { return getData(MetaIndex.ENDERMAN_AGRESSIVE); }