Example usage for net.minecraftforge.event.entity EntityEvent.EntityConstructing getEntity

List of usage examples for net.minecraftforge.event.entity EntityEvent.EntityConstructing getEntity

Introduction

In this page you can find the example usage for net.minecraftforge.event.entity EntityEvent.EntityConstructing getEntity.

Prototype

public Entity getEntity() 

Source Link

Usage

From source file:si.meansoft.traincraft.events.MinecartMovement.java

@SubscribeEvent
public void onMinecartInit(EntityEvent.EntityConstructing event) {
    Entity entity = event.getEntity();
    if (entity instanceof EntityMinecart) {
        //entity.getDataManager().register(Util.TEST, false);
    }/*w  ww  . jav  a  2 s .co m*/
}

From source file:vazkii.quark.tweaks.feature.ArmedArmorStands.java

License:Creative Commons License

@SubscribeEvent
public void entityConstruct(EntityEvent.EntityConstructing event) {
    if (event.getEntity() instanceof EntityArmorStand) {
        EntityArmorStand stand = (EntityArmorStand) event.getEntity();
        if (!stand.getShowArms())
            setShowArms(stand, true);/*ww w  .  ja v a  2s  . c om*/
    }
}