@SubscribeEvent(priority = EventPriority.HIGHEST)
public void onEntityUpdate(LivingUpdateEvent event) {
final double min = -0.0784000015258789;
if (event.entityLiving instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer) event.entityLiving;
int slowfall = EnchantmentHelper.getMaxEnchantmentLevel(LibEnchantIDs.idSlowFall, player.inventory.armorInventory);
if (slowfall > 0 && !event.entityLiving.isSneaking() && event.entityLiving.motionY < min && event.entityLiving.fallDistance >= 2.9) {
event.entityLiving.motionY /= 1 + slowfall * 0.33F;
event.entityLiving.fallDistance = Math.max(2.9F, player.fallDistance - slowfall / 3F);
player.worldObj.spawnParticle("cloud", player.posX + 0.25, player.posY - 1, player.posZ + 0.25, -player.motionX, player.motionY, -player.motionZ);
}
ItemStack heldItem = player.getHeldItem();
if (heldItem == null)
return;
int quickDraw = EnchantmentHelper.getEnchantmentLevel(LibEnchantIDs.idQuickDraw, heldItem);