当前位置: 首页>>代码示例>>Java>>正文


Java RenderHandEvent类代码示例

本文整理汇总了Java中net.minecraftforge.client.event.RenderHandEvent的典型用法代码示例。如果您正苦于以下问题:Java RenderHandEvent类的具体用法?Java RenderHandEvent怎么用?Java RenderHandEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


RenderHandEvent类属于net.minecraftforge.client.event包,在下文中一共展示了RenderHandEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: renderHand

import net.minecraftforge.client.event.RenderHandEvent; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void renderHand(RenderHandEvent event) {
	if (Minecraft.getMinecraft().thePlayer.getEntityData().hasKey("renderViewCamera")) {
		event.setCanceled(true);
	}
}
 
开发者ID:PorPit,项目名称:MineCamera,代码行数:8,代码来源:EventLoader.java

示例2: renderHand

import net.minecraftforge.client.event.RenderHandEvent; //导入依赖的package包/类
@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);
	}
}
 
开发者ID:rafradek,项目名称:Mods,代码行数:29,代码来源:TF2EventsClient.java

示例3: onRenderHand

import net.minecraftforge.client.event.RenderHandEvent; //导入依赖的package包/类
@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);
        }
    }
}
 
开发者ID:Fararise,项目名称:Possessed,代码行数:11,代码来源:ClientEventHandler.java

示例4: onRenderHand

import net.minecraftforge.client.event.RenderHandEvent; //导入依赖的package包/类
@SubscribeEvent
public void onRenderHand(RenderHandEvent evt)
{
	if (showScopeOverlap || showSpyglassOverlay) {
		evt.setCanceled(true);
	}
}
 
开发者ID:BubbleTrouble14,项目名称:ARKCraft,代码行数:8,代码来源:ClientEventHandler.java

示例5: onItemDrawing

import net.minecraftforge.client.event.RenderHandEvent; //导入依赖的package包/类
@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);
                }
            }
        }
    }
}
 
开发者ID:jglrxavpok,项目名称:MCDoom,代码行数:16,代码来源:MCDoomScreenEvents.java

示例6: on_render_world_hand_post

import net.minecraftforge.client.event.RenderHandEvent; //导入依赖的package包/类
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();
}
 
开发者ID:tiffit,项目名称:TaleCraft,代码行数:11,代码来源:ClientRenderer.java

示例7: onRenderHand

import net.minecraftforge.client.event.RenderHandEvent; //导入依赖的package包/类
@SubscribeEvent
public void onRenderHand(RenderHandEvent evt)
{
	if (showScopeOverlap)
	{
		evt.setCanceled(true);
	}
}
 
开发者ID:Archiving,项目名称:ARKCraft-Code,代码行数:9,代码来源:ClientEventHandler.java

示例8: renderHand

import net.minecraftforge.client.event.RenderHandEvent; //导入依赖的package包/类
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void renderHand(RenderHandEvent event) {
	if (EntityCamera.isActive()) {
		event.setCanceled(true);
	}
}
 
开发者ID:dmillerw,项目名称:RoboticMinions,代码行数:8,代码来源:RenderHelper.java

示例9: renderFirstPersonHand

import net.minecraftforge.client.event.RenderHandEvent; //导入依赖的package包/类
public static boolean renderFirstPersonHand(RenderGlobal context, float partialTicks, int renderPass)
{
    return MinecraftForge.EVENT_BUS.post(new RenderHandEvent(context, partialTicks, renderPass));
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:5,代码来源:ForgeHooksClient.java

示例10: onRenderHand

import net.minecraftforge.client.event.RenderHandEvent; //导入依赖的package包/类
@SubscribeEvent
public void onRenderHand(RenderHandEvent event) {
	if (Minecraft.getMinecraft().currentScreen instanceof GuiCamera) {
		event.setCanceled(true);
	}
}
 
开发者ID:tom5454,项目名称:Toms-Mod,代码行数:7,代码来源:EventHandlerClient.java

示例11: onRenderHand

import net.minecraftforge.client.event.RenderHandEvent; //导入依赖的package包/类
@SubscribeEvent
@SideOnly(Side.CLIENT)
public static void onRenderHand(RenderHandEvent event) {
	if (projectionState)
		AlchemyEventSystem.markEventCanceled(event);
}
 
开发者ID:NekoCaffeine,项目名称:Alchemy,代码行数:7,代码来源:SingleProjection.java

示例12: worldPostRenderHand

import net.minecraftforge.client.event.RenderHandEvent; //导入依赖的package包/类
@SubscribeEvent
public void worldPostRenderHand(RenderHandEvent event) {
	clientRenderer.on_render_world_hand_post(event);
}
 
开发者ID:tiffit,项目名称:TaleCraft,代码行数:5,代码来源:ClientProxy.java

示例13: onRenderHand

import net.minecraftforge.client.event.RenderHandEvent; //导入依赖的package包/类
@SubscribeEvent
public void onRenderHand(RenderHandEvent evt) {
    if (isUsingBinoculars()) {
        evt.setCanceled(true);
    }
}
 
开发者ID:Tonius,项目名称:Zoom,代码行数:7,代码来源:EventHandler.java

示例14: PlayerFPRenderer

import net.minecraftforge.client.event.RenderHandEvent; //导入依赖的package包/类
@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();
		}
	}
}
 
开发者ID:ArtixAllMighty,项目名称:rpginventory,代码行数:72,代码来源:RenderRpgPlayer.java

示例15: onRenderHand

import net.minecraftforge.client.event.RenderHandEvent; //导入依赖的package包/类
@SubscribeEvent
public void onRenderHand(RenderHandEvent e) {
	e.setCanceled(true);
}
 
开发者ID:unascribed,项目名称:Farrago,代码行数:5,代码来源:ToolBlockRenderer.java


注:本文中的net.minecraftforge.client.event.RenderHandEvent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。