Java 类net.minecraftforge.client.event.RenderLivingEvent 实例源码

项目:Bewitchment    文件:SkinTintBrew.java   
@SuppressWarnings("rawtypes")
@SideOnly(Side.CLIENT)
@Override
public void onRenderLiving(RenderLivingEvent.Pre event, RenderLivingBase renderer, int amplifier) {
    GlStateManager.pushMatrix();

    EnumDyeColor dye = EnumDyeColor.byDyeDamage(Math.min(amplifier, EnumDyeColor.values().length - 1));
    int rgb = dye.getColorValue();

    float r = (rgb >>> 16 & 0xFF) / 256.0F;
    float g = (rgb >>> 8 & 0xFF) / 256.0F;
    float b = (rgb & 0xFF) / 256.0F;
    GlStateManager.color(r, g, b);

    GlStateManager.popMatrix();
}
项目:ExtraUtilities    文件:EventHandlerClient.java   
@SubscribeEvent(priority = EventPriority.HIGHEST)
public void entityColorRender(final RenderLivingEvent.Pre event) {
    final String s = EnumChatFormatting.getTextWithoutFormattingCodes(event.entity.getCommandSenderName());
    if (s.startsWith("Aureylian") && !(event.entity instanceof EntityPlayer)) {
        GL11.glColor4f(0.9686f, 0.7059f, 0.8392f, 1.0f);
        this.resetRender = true;
    }
    if (EventHandlerClient.holograms.contains(s) && (!(event.entity instanceof EntityPlayer) || !((EntityPlayer)event.entity).getHideCape())) {
        GL11.glColor4f(1.0f, 1.0f, 1.0f, 0.45f);
        GL11.glEnable(3042);
        GL11.glBlendFunc(770, 771);
        this.resetRender = true;
    }
    if (s.equals("RWTema") && !(event.entity instanceof EntityPlayer)) {
        GL11.glColor4f(1.0f, 1.0f, 1.0f, 0.65f);
        GL11.glEnable(3042);
        GL11.glBlendFunc(770, 771);
        this.resetRender = true;
    }
    if (s.equals("jadedcat") && (!(event.entity instanceof EntityPlayer) || !((EntityPlayer)event.entity).getHideCape())) {
        GL11.glColor4f(0.69f, 0.392f, 0.847f, 1.0f);
        this.resetRender = true;
    }
}
项目:Kingdom-Keys-Re-Coded    文件:RenderEventHandler.java   
@SubscribeEvent
public void renderPlayer (RenderLivingEvent.Pre event) {
    if (event.getEntity() instanceof AbstractClientPlayer) {
        AbstractClientPlayer player = (AbstractClientPlayer) event.getEntity();

        UserManager manager = UserManager.getInstance();
        User user = manager.getUser(player.getUniqueID().toString());
        if (user == null) return;

        ICape cape = user.capes.get(0);
        if (cape == null) return;

        boolean flag = cape.isTextureLoaded(player);
        if (!flag) cape.loadTexture(player);
    }
}
项目:GelsPlus    文件:RenderEvent.java   
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void entityPreRender(RenderLivingEvent.Pre event) {
    if (GelsPlus.proxy.getRegistry().coloredList().containsKey(event.entity.getEntityId())) {
        GelAbility gel = null;
        try {
            gel = GelsPlus.proxy.getRegistry().getGel(GelsPlus.proxy.getRegistry().coloredList().get(event.entity.getEntityId())).newInstance();
        } catch (Exception e) {
            e.printStackTrace();
            GelsPlus.pktHandler.sendEverywhere(new PacketUpdateRegistry(event.entity));
            return;
        }
        if (gel != null)
            RenderUtils.applyColor(gel.gelColor());
    }
}
项目:Zombie-Total-Conversion-Craft    文件:PlayerBuffRenderManager.java   
@SuppressWarnings("unused")
@SubscribeEvent
public void onRenderPlayerEventPost(RenderLivingEvent.Post event) {
    if (event.entity != Minecraft.getMinecraft().thePlayer) {
        glPushMatrix();
        glEnable(GL_BLEND);
        glTranslated(event.x, event.y, event.z);
        if (EntityPlayer.class.isAssignableFrom(event.entity.getClass())) {
            /*IInventory baubles = BaublesApi.getBaubles((EntityPlayer) event.entity);
            if (baubles.getStackInSlot(2) != null) {
                TextureHelper.bindTexture(textureRingOfHealth);
                model.renderAll();
            } TODO: Baubles replacement*/
        }
        glDisable(GL_BLEND);
        glPopMatrix();
    }
}
项目:Combustible-Lemon-Launcher    文件:HoldLikeBowHook.java   
@SubscribeEvent
public void onEntityLiving(RenderLivingEvent.Pre<EntityPlayer> event){
    if(event.getEntity() instanceof EntityPlayer){
        EntityPlayer player = (EntityPlayer)event.getEntity();
        ItemStack stackMainHand = player.getHeldItemMainhand();
        if(stackMainHand != null && stackMainHand.getItem() == CommonProxy.itemCombustibleLemonLauncher){
            ModelBiped modelBiped = (ModelBiped)event.getRenderer().getMainModel();
            switch(Minecraft.getMinecraft().gameSettings.mainHand){
            case LEFT:
                modelBiped.leftArmPose = ArmPose.BOW_AND_ARROW;
                break;
            case RIGHT:
                modelBiped.rightArmPose = ArmPose.BOW_AND_ARROW;
                break;
            default:
                break;
            }
        }
    }
}
项目:Bewitchment    文件:ClientEvents.java   
@SuppressWarnings("rawtypes")
@SubscribeEvent
public void onRender(RenderLivingEvent.Pre event) {
    Collection<BrewEffect> effects = BrewStorageHandler.getBrewEffects(event.getEntity());
    effects.stream().filter(effect -> effect.getBrew() instanceof IBrewRenderLiving).forEach(effect -> {
        if (event.isCanceled()) return;
        ((IBrewRenderLiving) effect.getBrew()).onRenderLiving(event, event.getRenderer(), effect.getAmplifier());
    });
}
项目:bit-client    文件:NametagRenderEventDispatcher.java   
@Override
public void invoke(Event e) {
    RenderLivingEvent.Specials.Pre format = (RenderLivingEvent.Specials.Pre) e;
    NametagRenderEvent event = new NametagRenderEvent(format.entity);
    event.call();
    format.setCanceled(event.isCancelled());
}
项目:Mods    文件:TF2EventsClient.java   
@SubscribeEvent
public void renderLivingPostEntity(RenderLivingEvent.Post<EntityLivingBase> event) {
    if (!(event.getEntity() instanceof EntityPlayer || event.getEntity() instanceof EntityTF2Character))
        return;
    ClientProxy.renderCritGlow=0;
    if (event.getEntity().getActivePotionEffect(TF2weapons.uber)!=null) {
        GL11.glColor4f(1.0F, 1F, 1.0F, 1F);
    }
    // GlStateManager.enableLighting();
    if (event.getEntity().getCapability(TF2weapons.WEAPONS_CAP, null).invisTicks > 0) {
        GL11.glDisable(GL11.GL_BLEND);
        GL11.glColor4f(1.0F, 1F, 1.0F, 1F);
    }
}
项目:ExtraUtilities    文件:EventHandlerClient.java   
@SubscribeEvent
public void entityColorRender(final RenderLivingEvent.Post event) {
    if (!this.avoidRecursion && this.resetRender) {
        GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
        GL11.glDisable(3042);
    }
}
项目:metamorph    文件:RenderingHandler.java   
/**
 * On name render, simply render the name of the user, instead of the name of 
 * the entity.  
 */
@SubscribeEvent
public void onNameRender(RenderLivingEvent.Specials.Pre<EntityLivingBase> event)
{
    EntityLivingBase render = EntityMorph.renderEntity;

    if (render == null)
    {
        return;
    }

    event.setCanceled(true);

    EntityLivingBase entity = event.getEntity();

    if (!this.canRenderName(render, entity))
    {
        return;
    }

    double dist = entity.getDistanceSqToEntity(this.manager.renderViewEntity);
    float factor = entity.isSneaking() ? 32.0F : 64.0F;

    if (dist < (double) (factor * factor))
    {
        GlStateManager.alphaFunc(516, 0.1F);
        this.renderEntityName(entity, render.getDisplayName().getFormattedText(), event.getX(), event.getY(), event.getZ());
    }
}
项目:NinjaGear    文件:RenderPlayerHandler.java   
@SubscribeEvent
@SuppressWarnings("unused")
public void onRenderLivingEvent(RenderLivingEvent.Pre event) {
    EntityLivingBase entity = event.getEntity();
    if((entity instanceof EntityPlayer) && isInvisible((EntityPlayer) entity)) {
        event.setCanceled(true);
        event.setResult(Event.Result.DENY);
    }
}
项目:NinjaGear    文件:RenderPlayerHandler.java   
@SubscribeEvent
@SuppressWarnings("unused")
public void onRenderLivingSpecialsEvent(RenderLivingEvent.Specials.Pre event) {
    EntityLivingBase entity = event.getEntity();
    if ((entity instanceof EntityPlayer) && isInvisible((EntityPlayer) entity)) {
        event.setCanceled(true);
        event.setResult(Event.Result.DENY);
    }
}
项目:Alchemy    文件:PotionWitchcraft.java   
@SideOnly(Side.CLIENT)
@SubscribeEvent(priority = EventPriority.TOP)
public void onRenderLiving_Pre(RenderLivingEvent.Pre<EntityLivingBase> event) {
    if (last == event.getEntity())
        return;
    Minecraft minecraft = Minecraft.getMinecraft();
    EntityPlayer player = minecraft.player;
    EntityLivingBase living = event.getEntity();
    int id = living.getEntityData().getInteger(NBT_KEY_RENDER);
    if (id != 0) {
        AlchemyEventSystem.markEventCanceled(event);
        last = AlchemyEntityManager.getEntityById(AlchemyEntityManager.FRIENDLY_LIVING_LIST, id, minecraft.world);
        float partialTick = minecraft.getRenderPartialTicks();
        double lx = living.lastTickPosX + (living.posX - living.lastTickPosX) * partialTick;
        double ly = living.lastTickPosY + (living.posY - living.lastTickPosY) * partialTick;
        double lz = living.lastTickPosZ + (living.posZ - living.lastTickPosZ) * partialTick;
        double px = player.lastTickPosX + (player.posX - player.lastTickPosX) * partialTick;
        double py = player.lastTickPosY + (player.posY - player.lastTickPosY) * partialTick;
        double pz = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * partialTick;
        float f = living.prevRotationYaw + (living.rotationYaw - living.prevRotationYaw) * partialTick;
        glPushMatrix();
        glTranslated(lx - px, ly - py, lz - pz);
        glRotatef(-f % 360, 0, 1, 0);
        RenderHelper.renderEntity(last, partialTick);
        glPopMatrix();
    }
}
项目:ARKCraft    文件:ClientEventHandler.java   
@SubscribeEvent
public void holding(RenderLivingEvent.Pre event)
{
    Minecraft mc = Minecraft.getMinecraft();
    EntityPlayer thePlayer = mc.player;
    ItemStack stack = thePlayer.getActiveItemStack();
    if (!event.isCanceled() && event.getEntity().equals(thePlayer) && stack != null) {
        if (stack.getItem() instanceof ItemRangedWeapon) {
            ModelPlayer model = (ModelPlayer) event.getRenderer().getMainModel();
            // TODO adapt for left/right handed
            model.rightArmPose = ArmPose.BOW_AND_ARROW;
        }
    }
}
项目:SAO-UI---1.8    文件:RenderHandler.java   
static void renderEntity(RenderLivingEvent.Post e) {
    if (!OptionCore.UI_ONLY.getValue()) {
        if (e.entity != mc.thePlayer) {
            StaticRenderer.render(e.renderer.getRenderManager(), e.entity, e.x, e.y, e.z);
        }
    }
}
项目:Talismans2    文件:PlayerRenderHandler.java   
@SubscribeEvent
    public void onRenderLiving(RenderLivingEvent.Specials.Post event)
    {
        if (!(event.entity instanceof EntityPlayer))
            return;
        ItemStack iS = TalismanStacks.talismanFlame;
        Minecraft mc = Minecraft.getMinecraft();
//      IIcon icon = ModItems.FlameTalisman.getIconFromDamage(0); // This can

        // changed to
        // whatever you
        // want

//      mc.getTextureManager().bindTexture(TextureMap.locationItemsTexture);
        // mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
        // Uncomment this if using a block texture

        final float yOffset = 0.65F; // Adjusts how far above the player to
                                        // render
        final float spinModifier = 30F; // Controls how fast the texture spins.
                                        // Lower number equals faster spin

        float spin = (((float) clientTickCount) / spinModifier)
                * (180F / (float) Math.PI);

        GL11.glPushMatrix();

        GL11.glTranslatef((float) event.x + 0.0F, (float) event.y
                + event.entity.height + yOffset, (float) event.z);
        GL11.glNormal3f(0.0F, 1.0F, 0.0F);

        GL11.glRotatef(spin, 0, 1, 0);

        GL11.glScaled(0.5, 0.5, 0.5);

//      RendererUtil.renderItemIn3d(iS);

        GL11.glPopMatrix();

    }
项目:ARKCraft-Code    文件:ClientEventHandler.java   
@SubscribeEvent
public void holding(RenderLivingEvent.Pre event)
{
    Minecraft mc = Minecraft.getMinecraft();
    EntityPlayer thePlayer = mc.thePlayer;
    ItemStack stack = thePlayer.getCurrentEquippedItem();
    if (!event.isCanceled() && event.entity.equals(thePlayer) && stack != null)
    {
        if (stack.getItem() instanceof ItemRangedWeapon)
        {
            ModelPlayer model = (ModelPlayer) event.renderer.getMainModel();
            model.aimedBow = true;
        }
    }
}
项目:minedriod    文件:EntityLabelManager.java   
@SubscribeEvent
public void onEntityRendering(RenderLivingEvent.Specials.Pre event) {
    EntityLivingBase entity = (EntityLiving) event.entity;
    if (!holders.containsKey(event.entity.getClass())) return;
    synchronized (used) {
        EntityViewInformation info = used.get(entity.getEntityId());
        if (info == null) {
            info = new EntityViewInformation();
            Class<? extends EntityLabelHolder> holderClass = holders.get(entity.getClass());
            if (reusable.containsKey(holderClass) && reusable.get(holderClass).size() > 0) {
                synchronized (reusable) {
                    info.view = reusable.get(holderClass).remove(0);
                }
            } else {
                try {
                    EntityLabelHolder holder = holderClass.newInstance();
                    info.view = holder.getView();
                    info.view.setHolder(holder);
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
            }
            info.view.getHolder().setObject(entity);
            used.put(entity.getEntityId(), info);
        }
        info.used++;
        draw(entity, info.view);
    }
}
项目:SAO-UI---1.8    文件:RenderHandler.java   
static void renderEntity(RenderLivingEvent.Post e) {
    if (!OptionCore.UI_ONLY.getValue()) {
        if (e.entity != mc.thePlayer) {
            StaticRenderer.render(e.renderer.getRenderManager(), e.entity, e.x, e.y, e.z);
        }
    }
}
项目:multishot    文件:RenderEventHandler.java   
@SubscribeEvent
public void onRenderLivingPre(RenderLivingEvent.Pre<EntityPlayer> event)
{
    if (this.viewEntityOriginal != null)
    {
        this.mc.getRenderManager().renderViewEntity = this.viewEntityOriginal;
        this.viewEntityOriginal = null;
    }
}
项目:Corruption    文件:EventHandler.java   
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void onRenderLiving(RenderLivingEvent.Specials.Pre e) {
    if (e.entity instanceof EntityPlayer) {
        if (Corruption.isDebugMode) {
            boolean drawPlate = Minecraft.isGuiEnabled() && e.entity != RenderManager.instance.livingPlayer && !e.entity.isInvisibleToPlayer(Minecraft.getMinecraft().thePlayer) && e.entity.riddenByEntity == null;
            if (drawPlate) {
                String drawString = "Corruption: " + CorruptionDataHelper.getCorruptionForPlayer((EntityPlayer) e.entity);
                RenderHelper.drawMultiLineMessageFacingPlayer(e.x, e.y + ((EntityPlayer) e.entity).height + 0.75, e.z, 0.02F, new String[]{drawString}, 0xFFFFFF, true, true);
            }
        }
    }
}
项目:Chisel-2    文件:PlayerSpecials.java   
@SubscribeEvent(priority = EventPriority.HIGHEST)
public void onPlayerRenderPre(RenderLivingEvent.Pre event) {
       if(nameIsGood(event.entity)){
           GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F);
           GL11.glEnable(GL11.GL_BLEND);
           GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
       }
}
项目:Chisel-2    文件:PlayerSpecials.java   
@SubscribeEvent
public void onPlayerRenderPost(RenderLivingEvent.Post event) {
       if(nameIsGood(event.entity)){
           GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
           GL11.glDisable(GL11.GL_BLEND);
       }
}
项目:HideNames    文件:HNEventHandlerForge.java   
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void onRenderLiving(RenderLivingEvent.Specials.Pre event)
{
    if (event.entity instanceof EntityPlayer)
    {
        if (event.isCancelable())
        {
            Object hidden = HideNames.instance.hiddenPlayers.get(event.entity.getCommandSenderName().toLowerCase());
            if (hidden != null && (Boolean)hidden) {
                event.setCanceled(true);
            }
        }
    }
}
项目:Fluxed-Trinkets    文件:EventHandler.java   
@SubscribeEvent(priority = EventPriority.HIGHEST)
public void render(RenderLivingEvent.Pre event) {
    String s = EnumChatFormatting.getTextWithoutFormattingCodes(event.entity.getCommandSenderName());
    if (s.equals("jaredlll08") && event.entity instanceof EntityPlayer) {
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.50F);
        GL11.glEnable(3042);
        GL11.glBlendFunc(770, 771);
        resetRender = true;
    }
}
项目:Fluxed-Trinkets    文件:EventHandler.java   
@SubscribeEvent
public void entityColorRender(RenderLivingEvent.Post event) {
    if (this.resetRender) {
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        GL11.glDisable(3042);
    }
}
项目:CodeLyokoMod    文件:ClientEventHandler.java   
@SubscribeEvent
public void onLivingRender(RenderLivingEvent.Specials.Pre event)
{
    if (event.entity instanceof EntityXanafiedMob) {
        EntityXanafiedMob xana = (EntityXanafiedMob) event.entity;
        if (xana.infectedMob != null) {
            // event.setCanceled(true);
        }
    }
}
项目:EnderIO    文件:TeleportEntityRenderHandler.java   
@SubscribeEvent
public static void onEntityRender(RenderLivingEvent.Pre<EntityLivingBase> event) {
  if (TelePadConfig.telepadShrinkEffect.get()) {
    final NBTTagCompound entityData = event.getEntity().getEntityData();
    boolean isTarget = false;
    if (entityData.getBoolean(TileTelePad.TELEPORTING_KEY)) {
      isTarget = true;
      // shrink the entity for longer than the teleport lasts so it doesn't pop big again at the source location
      entityData.setInteger("eio_delay", 7);
    } else if (entityData.hasKey("eio_delay")) {
      int delay = entityData.getInteger("eio_delay") - 1;
      if (delay > 0) {
        entityData.setInteger("eio_delay", delay);
      } else {
        entityData.removeTag("eio_delay");
        entityData.removeTag("eio_teleportrotation");
      }
      isTarget = true;
    }
    if (isTarget) {
      final float progress = entityData.hasKey(TileTelePad.PROGRESS_KEY) ? entityData.getFloat(TileTelePad.PROGRESS_KEY) : 1;
      GlStateManager.pushMatrix();
      GlStateManager.translate(event.getX(), event.getY(), event.getZ());
      final float scale = 1 - progress * 0.75f;
      GlStateManager.scale(scale, scale, scale);
      GlStateManager.translate(-event.getX(), -event.getY(), -event.getZ());
      entityData.setBoolean("eio_needs_pop", true);
    }
  }
}
项目:ModJam3-Exocraft    文件:ExoCraftClientEventHandler.java   
@ForgeSubscribe
public void RenderLivingEvent(RenderLivingEvent.Pre event)
{
    if (event.entity instanceof EntityPlayer)
    {
        if (event.entity.ridingEntity != null
                && event.entity.ridingEntity instanceof EntityMech)
        {
            event.setCanceled(true);
        }
    }
}
项目:Bewitchment    文件:IBrewRenderLiving.java   
@SuppressWarnings("rawtypes")
@SideOnly(Side.CLIENT)
void onRenderLiving(RenderLivingEvent.Pre event, RenderLivingBase renderer, int amplifier);
项目:ForgeHax    文件:ChamsMod.java   
@SubscribeEvent
public void onPreRenderLiving(RenderLivingEvent.Pre event) {
    GL11.glEnable(GL11.GL_POLYGON_OFFSET_FILL);
    GlStateManager.enablePolygonOffset();
    GlStateManager.doPolygonOffset(1.0F, -1000000);
}
项目:ForgeHax    文件:ChamsMod.java   
@SubscribeEvent
public void onPostRenderLiving(RenderLivingEvent.Post event) {
    GL11.glDisable(GL11.GL_POLYGON_OFFSET_FILL);
    GlStateManager.doPolygonOffset(1.0F, 1000000);
    GlStateManager.disablePolygonOffset();
}
项目:ForgeHax    文件:ESP.java   
@SubscribeEvent
public void onRenderPlayerNameTag(RenderLivingEvent.Specials.Pre event) {
    if(EntityUtils.isPlayer(event.getEntity()))
        event.setCanceled(true);
}
项目:ForgeHax    文件:AntiBatsMod.java   
@SubscribeEvent
public void onRenderLiving(RenderLivingEvent.Pre<?> event) {
    if(event.getEntity() instanceof EntityBat)
        event.setCanceled(true);
}
项目:bit-client    文件:NametagRenderEventDispatcher.java   
@Override
public void nullify() {
    unregister(this, MinecraftForge.EVENT_BUS, RenderLivingEvent.Specials.Pre.class);
}
项目:bit-client    文件:NametagRenderEventDispatcher.java   
public NametagRenderEventDispatcher() {
    register(this, MinecraftForge.EVENT_BUS, RenderLivingEvent.Specials.Pre.class);
}
项目:Mods    文件:SpinToWin.java   
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void renderLivingEntity(RenderLivingEvent.Pre<EntityPlayer> event) {
    if(event.getEntity() instanceof EntityPlayer && event.getEntity().getDataManager().get(SPIN_TIME))
        ((ModelPlayer)event.getRenderer().getMainModel()).rightArmPose=ArmPose.BOW_AND_ARROW;
}
项目:4Space-5    文件:RendererLivingEntity.java   
/**
 * Passes the specialRender and renders it
 */
protected void passSpecialRender(EntityLivingBase p_77033_1_, double p_77033_2_, double p_77033_4_, double p_77033_6_)
{
    if (MinecraftForge.EVENT_BUS.post(new RenderLivingEvent.Specials.Pre(p_77033_1_, this, p_77033_2_, p_77033_4_, p_77033_6_))) return;
    GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);

    if (this.func_110813_b(p_77033_1_))
    {
        float f = 1.6F;
        float f1 = 0.016666668F * f;
        double d3 = p_77033_1_.getDistanceSqToEntity(this.renderManager.livingPlayer);
        float f2 = p_77033_1_.isSneaking() ? NAME_TAG_RANGE_SNEAK : NAME_TAG_RANGE;

        if (d3 < (double)(f2 * f2))
        {
            String s = p_77033_1_.func_145748_c_().getFormattedText();

            if (p_77033_1_.isSneaking())
            {
                FontRenderer fontrenderer = this.getFontRendererFromRenderManager();
                GL11.glPushMatrix();
                GL11.glTranslatef((float)p_77033_2_ + 0.0F, (float)p_77033_4_ + p_77033_1_.height + 0.5F, (float)p_77033_6_);
                GL11.glNormal3f(0.0F, 1.0F, 0.0F);
                GL11.glRotatef(-this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
                GL11.glRotatef(this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
                GL11.glScalef(-f1, -f1, f1);
                GL11.glDisable(GL11.GL_LIGHTING);
                GL11.glTranslatef(0.0F, 0.25F / f1, 0.0F);
                GL11.glDepthMask(false);
                GL11.glEnable(GL11.GL_BLEND);
                OpenGlHelper.glBlendFunc(770, 771, 1, 0);
                Tessellator tessellator = Tessellator.instance;
                GL11.glDisable(GL11.GL_TEXTURE_2D);
                tessellator.startDrawingQuads();
                int i = fontrenderer.getStringWidth(s) / 2;
                tessellator.setColorRGBA_F(0.0F, 0.0F, 0.0F, 0.25F);
                tessellator.addVertex((double)(-i - 1), -1.0D, 0.0D);
                tessellator.addVertex((double)(-i - 1), 8.0D, 0.0D);
                tessellator.addVertex((double)(i + 1), 8.0D, 0.0D);
                tessellator.addVertex((double)(i + 1), -1.0D, 0.0D);
                tessellator.draw();
                GL11.glEnable(GL11.GL_TEXTURE_2D);
                GL11.glDepthMask(true);
                fontrenderer.drawString(s, -fontrenderer.getStringWidth(s) / 2, 0, 553648127);
                GL11.glEnable(GL11.GL_LIGHTING);
                GL11.glDisable(GL11.GL_BLEND);
                GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
                GL11.glPopMatrix();
            }
            else
            {
                this.func_96449_a(p_77033_1_, p_77033_2_, p_77033_4_, p_77033_6_, s, f1, d3);
            }
        }
    }
    MinecraftForge.EVENT_BUS.post(new RenderLivingEvent.Specials.Post(p_77033_1_, this, p_77033_2_, p_77033_4_, p_77033_6_));
}
项目:Alchemy    文件:GuiWardrobe.java   
@SubscribeEvent
public static void onRenderLiving_Specials_Pre(RenderLivingEvent.Specials.Pre event) {
    if (event.getEntity() == player)
        AlchemyEventSystem.markEventCanceled(event);
}