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

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

Introduction

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

Prototype

boolean isMounting

To view the source code for net.minecraftforge.event.entity EntityMountEvent isMounting.

Click Source Link

Usage

From source file:necauqua.mods.cm.Handlers.java

License:Apache License

@SubscribeEvent
public void onEntityMount(EntityMountEvent e) { // todo this is temp, remove after riding fix (not soon)
    if (e.isMounting()
            && (getSize(e.getEntityMounting()) != 1.0F || getSize(e.getEntityBeingMounted()) != 1.0F)) {
        e.setCanceled(true);//from w  w  w  .  j  a va2  s  . co m
    }
}