Search in sources :

Example 1 with IAnimatablePlayerModel

use of com.infinityraider.infinitylib.modules.playeranimations.IAnimatablePlayerModel in project AgriCraft by AgriCraft.

the class JournalViewPointHandler method onPlayerRender.

@SuppressWarnings("unused")
@SubscribeEvent
public void onPlayerRender(RenderPlayerEvent.Pre event) {
    if (event.getPlayer() == AgriCraft.instance.getClientPlayer()) {
        if (event.getRenderer().getEntityModel() instanceof IAnimatablePlayerModel) {
            IAnimatablePlayerModel model = (IAnimatablePlayerModel) event.getRenderer().getEntityModel();
            model.setDoArmWobble(!this.isActive());
        }
    }
}
Also used : IAnimatablePlayerModel(com.infinityraider.infinitylib.modules.playeranimations.IAnimatablePlayerModel) SubscribeEvent(net.minecraftforge.eventbus.api.SubscribeEvent)

Aggregations

IAnimatablePlayerModel (com.infinityraider.infinitylib.modules.playeranimations.IAnimatablePlayerModel)1 SubscribeEvent (net.minecraftforge.eventbus.api.SubscribeEvent)1