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

项目:MineCamera    文件:EventLoader.java   
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void renderHand(RenderHandEvent event) {
    if (Minecraft.getMinecraft().thePlayer.getEntityData().hasKey("renderViewCamera")) {
        event.setCanceled(true);
    }
}
项目:Mods    文件:TF2EventsClient.java   
@SubscribeEvent
public void renderHand(RenderHandEvent event) {

    EntityPlayer player=Minecraft.getMinecraft().player;
    if (!player.getHeldItemMainhand().isEmpty()){
        ClientProxy.renderCritGlow=TF2Util.calculateCritPre(player.getHeldItemMainhand(),player)*16+TF2Util.getTeamColorNumber(player);
    }
    else{
        ClientProxy.renderCritGlow=0;
    }
    if (WeaponsCapability.get(player).isInvisible() ||player.getCapability(TF2weapons.WEAPONS_CAP, null).isCharging()) {
        /*
         * GL11.glEnable(GL11.GL_BLEND); GlStateManager.clear(256);
         * OpenGlHelper.glBlendFunc(770, 771, 1, 0);
         * if(Minecraft.getMinecraft().player.getEntityData().getInteger(
         * "VisTicks")>=20){ GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75f); }
         * else{ GL11.glColor4f(1.0F, 1.0F, 1.0F,
         * 0.6f*(1-(float)Minecraft.getMinecraft().player.getEntityData()
         * .getInteger("VisTicks")/20)); } try { Method
         * method=EntityRenderer.class.getDeclaredMethod("renderHand",
         * float.class, int.class); method.setAccessible(true);
         * method.invoke(Minecraft.getMinecraft().entityRenderer,
         * event.partialTicks,event.renderPass); } catch (Exception e) { //
         * TODO Auto-generated catch block e.printStackTrace(); }
         */
        event.setCanceled(true);
    }
}
项目:Possessed    文件:ClientEventHandler.java   
@SubscribeEvent
public void onRenderHand(RenderHandEvent event) {
    EntityPlayer player = ClientEventHandler.MINECRAFT.thePlayer;
    if (player.getHeldItem(EnumHand.MAIN_HAND) == null) {
        PossessivePlayer possessivePlayer = PossessHandler.get(player);
        if (possessivePlayer != null) {
            event.setCanceled(true);
        }
    }
}
项目:ARKCraft    文件:ClientEventHandler.java   
@SubscribeEvent
public void onRenderHand(RenderHandEvent evt)
{
    if (showScopeOverlap || showSpyglassOverlay) {
        evt.setCanceled(true);
    }
}
项目:MCDoom    文件:MCDoomScreenEvents.java   
@SubscribeEvent
public void onItemDrawing(RenderHandEvent event) {
    Entity e = Minecraft.getMinecraft().getRenderViewEntity();
    if(MCDoom.instance.getDoomItemPoseProperty().getBoolean()) {
        if (e instanceof EntityPlayer) {
            ItemStack currentItem = ((EntityPlayer) e).inventory.getCurrentItem();
            if (currentItem != null && currentItem.getItem() != null) {
                Item actualItem = currentItem.getItem();
                if (actualItem instanceof WeaponItem) {
                    event.setCanceled(true);
                }
            }
        }
    }
}
项目:TaleCraft    文件:ClientRenderer.java   
public void on_render_world_hand_post(RenderHandEvent event) {
    if(fadeEffect != null && mc.ingameGUI != null){
        fadeEffect.render();

        // Do NOT draw the hand!
        event.setCanceled(true);
    }

    GlStateManager.enableTexture2D();
}
项目:ARKCraft-Code    文件:ClientEventHandler.java   
@SubscribeEvent
public void onRenderHand(RenderHandEvent evt)
{
    if (showScopeOverlap)
    {
        evt.setCanceled(true);
    }
}
项目:RoboticMinions    文件:RenderHelper.java   
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void renderHand(RenderHandEvent event) {
    if (EntityCamera.isActive()) {
        event.setCanceled(true);
    }
}
项目:CustomWorldGen    文件:ForgeHooksClient.java   
public static boolean renderFirstPersonHand(RenderGlobal context, float partialTicks, int renderPass)
{
    return MinecraftForge.EVENT_BUS.post(new RenderHandEvent(context, partialTicks, renderPass));
}
项目:TRHS_Club_Mod_2016    文件:ForgeHooksClient.java   
public static boolean renderFirstPersonHand(RenderGlobal context, float partialTicks, int renderPass)
{
    return MinecraftForge.EVENT_BUS.post(new RenderHandEvent(context, partialTicks, renderPass));
}
项目:Toms-Mod    文件:EventHandlerClient.java   
@SubscribeEvent
public void onRenderHand(RenderHandEvent event) {
    if (Minecraft.getMinecraft().currentScreen instanceof GuiCamera) {
        event.setCanceled(true);
    }
}
项目:Alchemy    文件:SingleProjection.java   
@SubscribeEvent
@SideOnly(Side.CLIENT)
public static void onRenderHand(RenderHandEvent event) {
    if (projectionState)
        AlchemyEventSystem.markEventCanceled(event);
}
项目:TaleCraft    文件:ClientProxy.java   
@SubscribeEvent
public void worldPostRenderHand(RenderHandEvent event) {
    clientRenderer.on_render_world_hand_post(event);
}
项目:CauldronGit    文件:ForgeHooksClient.java   
public static boolean renderFirstPersonHand(RenderGlobal context, float partialTicks, int renderPass)
{
    return MinecraftForge.EVENT_BUS.post(new RenderHandEvent(context, partialTicks, renderPass));
}
项目:Zoom    文件:EventHandler.java   
@SubscribeEvent
public void onRenderHand(RenderHandEvent evt) {
    if (isUsingBinoculars()) {
        evt.setCanceled(true);
    }
}
项目:rpginventory    文件:RenderRpgPlayer.java   
@SubscribeEvent
public void PlayerFPRenderer(RenderHandEvent e){

    ItemStack shield = PlayerRpgInventory.get(mc.thePlayer).getShield();
    ItemStack glove = PlayerRpgInventory.get(mc.thePlayer).getGloves();

    if (shield != null || glove != null){

        float par1 = e.partialTicks;
        int par2 = e.renderPass;

        if (mc.entityRenderer.debugViewDirection <= 0)
        {
            GL11.glClear(GL11.GL_DEPTH_BUFFER_BIT);
            GL11.glMatrixMode(GL11.GL_PROJECTION);
            GL11.glLoadIdentity();
            float f1 = 0.07F;

            if (this.mc.gameSettings.anaglyph) {
                GL11.glTranslatef((-((par2 * 2) - 1)) * f1, 0.0F, 0.0F);
            }

            GL11.glMatrixMode(GL11.GL_MODELVIEW);
            GL11.glLoadIdentity();

            if (this.mc.gameSettings.anaglyph) {
                GL11.glTranslatef(((par2 * 2) - 1) * 0.1F, 0.0F, 0.0F);
            }

            GL11.glPushMatrix();
            hurtCameraEffect(par1);

            if (this.mc.gameSettings.viewBobbing) {
                setupViewBobbing(par1);
            }

            if ((this.mc.gameSettings.thirdPersonView == 0) && !this.mc.renderViewEntity.isPlayerSleeping() && !this.mc.gameSettings.hideGUI && !this.mc.playerController.enableEverythingIsScrewedUpMode())
            {

                if(shield != null ){
                    ItemRpgInvArmor theShield = ((ItemRpgInvArmor) shield.getItem());
                    mc.renderEngine.bindTexture(theShield.getTexture());

                    renderFPShield(shield, par1);

                    if (theShield.isMantle() && mc.thePlayer.isSneaking() && PlayerRpgInventory.get(mc.thePlayer).isBlocking()) {
                        renderMantle(mc.thePlayer, ((ItemRpgInvArmor) shield.getItem()).getMantleTexture(), true);
                    }

                }
                if(glove != null && mc.thePlayer.getHeldItem() == null){

                    //                      Render render = RenderManager.instance.getEntityRenderObject(this.mc.thePlayer);
                    //                      biped = ((RenderPlayer)render).modelBipedMain;
                    //                      replacement  = (ModelRenderer) rightglove.boxList.get(0);
                    ////                        ((ItemRpgInvArmor) glove.getItem()).getTexture()

                    if(RpgConfig.instance.glovesFprendering){
                        e.setCanceled(true);
                        mc.renderEngine.bindTexture(((ItemRpgInvArmor) glove.getItem()).getTexture());
                        renderFPSGlove(rightglove, par1);
                    }

                    //                      renderHand(glove);
                }
            }

            GL11.glPopMatrix();
        }
    }
}
项目:Farrago    文件:ToolBlockRenderer.java   
@SubscribeEvent
public void onRenderHand(RenderHandEvent e) {
    e.setCanceled(true);
}
项目:SecurityCraft    文件:SCEventHandler.java   
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void renderHandEvent(RenderHandEvent event){
    if(PlayerUtils.isPlayerMountedOnCamera(Minecraft.getMinecraft().thePlayer))
        event.setCanceled(true);
}
项目:SecurityCraft    文件:SCEventHandler.java   
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void renderHandEvent(RenderHandEvent event){
    if(PlayerUtils.isPlayerMountedOnCamera(Minecraft.getMinecraft().player))
        event.setCanceled(true);
}
项目:SecurityCraft    文件:SCEventHandler.java   
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void renderHandEvent(RenderHandEvent event){
    if(PlayerUtils.isPlayerMountedOnCamera(Minecraft.getMinecraft().thePlayer))
        event.setCanceled(true);
}
项目:SecurityCraft    文件:SCEventHandler.java   
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void renderHandEvent(RenderHandEvent event){
    if(PlayerUtils.isPlayerMountedOnCamera(Minecraft.getMinecraft().thePlayer))
        event.setCanceled(true);
}
项目:SecurityCraft    文件:SCEventHandler.java   
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void renderHandEvent(RenderHandEvent event){
    if(PlayerUtils.isPlayerMountedOnCamera(Minecraft.getMinecraft().player))
        event.setCanceled(true);
}
项目:SecurityCraft    文件:SCEventHandler.java   
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void renderHandEvent(RenderHandEvent event){
    if(PlayerUtils.isPlayerMountedOnCamera(Minecraft.getMinecraft().thePlayer))
        event.setCanceled(true);
}
项目:Cauldron    文件:ForgeHooksClient.java   
public static boolean renderFirstPersonHand(RenderGlobal context, float partialTicks, int renderPass)
{
    return MinecraftForge.EVENT_BUS.post(new RenderHandEvent(context, partialTicks, renderPass));
}
项目:Cauldron    文件:ForgeHooksClient.java   
public static boolean renderFirstPersonHand(RenderGlobal context, float partialTicks, int renderPass)
{
    return MinecraftForge.EVENT_BUS.post(new RenderHandEvent(context, partialTicks, renderPass));
}
项目:Cauldron    文件:ForgeHooksClient.java   
public static boolean renderFirstPersonHand(RenderGlobal context, float partialTicks, int renderPass)
{
    return MinecraftForge.EVENT_BUS.post(new RenderHandEvent(context, partialTicks, renderPass));
}