Example usage for net.minecraftforge.event.entity EntityMountEvent isDismounting

List of usage examples for net.minecraftforge.event.entity EntityMountEvent isDismounting

Introduction

In this page you can find the example usage for net.minecraftforge.event.entity EntityMountEvent isDismounting.

Prototype

public boolean isDismounting() 

Source Link

Usage

From source file:com.parachute.common.PlayerMountEvent.java

License:Open Source License

@SuppressWarnings("unused")
@SubscribeEvent/* w  w  w.j a va2  s  .c  o  m*/
public void onMount(EntityMountEvent event) {
    if (event.entityBeingMounted instanceof EntityParachute && event.isDismounting()) {
        event.setCanceled(true);
        ((EntityParachute) event.entityBeingMounted).dismountParachute();
    }
}