Tutorial by Examples

Entity falling distance is the distance the entity have fallen without reaching a block. It can be used to calculate different damage from falling, or activating an effect after a big fall. Retrieving the falling distance float distanceFell = entity.getFallingDistance(); Setting the falling ...
You can cancel a fall damage by using the EntityDamageEvent @EventHandler public void onEntityDamage(EntityDamageEvent e) { Entity tookDamage = e.getEntity(); DamageCause cause = e.getCause(); if (cause == DamageCause.FALL){ //Damage was caused by falling, cancel it e.setCancelled(t...

Page 1 of 1