Search in sources :

Example 1 with EntityRenderEvent

use of cc.hyperium.event.render.EntityRenderEvent in project Hyperium by HyperiumClient.

the class MixinRendererLivingEntity method doRender.

@Inject(method = "doRender", at = @At("HEAD"), cancellable = true)
private void doRender(T entity, double x, double y, double z, float entityYaw, float partialTicks, CallbackInfo ci) {
    if (Settings.DISABLE_ARMORSTANDS && entity instanceof EntityArmorStand)
        ci.cancel();
    final EntityRenderEvent event = new EntityRenderEvent(entity, (float) x, (float) y, (float) z, entity.rotationPitch, entityYaw, 1.0F);
    EventBus.INSTANCE.post(event);
    if (event.isCancelled()) {
        ci.cancel();
    }
}
Also used : EntityRenderEvent(cc.hyperium.event.render.EntityRenderEvent) EntityArmorStand(net.minecraft.entity.item.EntityArmorStand) Inject(org.spongepowered.asm.mixin.injection.Inject)

Aggregations

EntityRenderEvent (cc.hyperium.event.render.EntityRenderEvent)1 EntityArmorStand (net.minecraft.entity.item.EntityArmorStand)1 Inject (org.spongepowered.asm.mixin.injection.Inject)1