Java Code Examples for net.minecraft.util.DamageSource#FALL
The following examples show how to use
net.minecraft.util.DamageSource#FALL .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EventHandler.java From Wizardry with GNU Lesser General Public License v3.0 | 5 votes |
@SubscribeEvent public void underworldTeleport(LivingHurtEvent event) { if (!(event.getEntity() instanceof EntityPlayer)) return; if (fallResetter.contains(event.getEntity().getUniqueID())) { if (event.getEntity().posY < 0 || event.getEntity().posY > event.getEntity().world.getHeight()) { event.setCanceled(true); return; } if (event.getSource() == DamageSource.FALL) { fallResetter.remove(event.getEntity().getUniqueID()); event.setCanceled(true); } } }