本文整理汇总了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);
}
}
示例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);
}
}
示例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);
}
}
}
示例4: onRenderHand
import net.minecraftforge.client.event.RenderHandEvent; //导入依赖的package包/类
@SubscribeEvent
public void onRenderHand(RenderHandEvent evt)
{
if (showScopeOverlap || showSpyglassOverlay) {
evt.setCanceled(true);
}
}
示例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);
}
}
}
}
}
示例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();
}
示例7: onRenderHand
import net.minecraftforge.client.event.RenderHandEvent; //导入依赖的package包/类
@SubscribeEvent
public void onRenderHand(RenderHandEvent evt)
{
if (showScopeOverlap)
{
evt.setCanceled(true);
}
}
示例8: renderHand
import net.minecraftforge.client.event.RenderHandEvent; //导入依赖的package包/类
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void renderHand(RenderHandEvent event) {
if (EntityCamera.isActive()) {
event.setCanceled(true);
}
}
示例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));
}
示例10: onRenderHand
import net.minecraftforge.client.event.RenderHandEvent; //导入依赖的package包/类
@SubscribeEvent
public void onRenderHand(RenderHandEvent event) {
if (Minecraft.getMinecraft().currentScreen instanceof GuiCamera) {
event.setCanceled(true);
}
}
示例11: onRenderHand
import net.minecraftforge.client.event.RenderHandEvent; //导入依赖的package包/类
@SubscribeEvent
@SideOnly(Side.CLIENT)
public static void onRenderHand(RenderHandEvent event) {
if (projectionState)
AlchemyEventSystem.markEventCanceled(event);
}
示例12: worldPostRenderHand
import net.minecraftforge.client.event.RenderHandEvent; //导入依赖的package包/类
@SubscribeEvent
public void worldPostRenderHand(RenderHandEvent event) {
clientRenderer.on_render_world_hand_post(event);
}
示例13: onRenderHand
import net.minecraftforge.client.event.RenderHandEvent; //导入依赖的package包/类
@SubscribeEvent
public void onRenderHand(RenderHandEvent evt) {
if (isUsingBinoculars()) {
evt.setCanceled(true);
}
}
示例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();
}
}
}
示例15: onRenderHand
import net.minecraftforge.client.event.RenderHandEvent; //导入依赖的package包/类
@SubscribeEvent
public void onRenderHand(RenderHandEvent e) {
e.setCanceled(true);
}