本文整理汇总了Java中net.minecraftforge.client.event.RenderSpecificHandEvent类的典型用法代码示例。如果您正苦于以下问题:Java RenderSpecificHandEvent类的具体用法?Java RenderSpecificHandEvent怎么用?Java RenderSpecificHandEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RenderSpecificHandEvent类属于net.minecraftforge.client.event包,在下文中一共展示了RenderSpecificHandEvent类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: renderItem
import net.minecraftforge.client.event.RenderSpecificHandEvent; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void renderItem(RenderSpecificHandEvent event) {
Minecraft minecraft = Minecraft.getMinecraft();
if (event.getHand() == EnumHand.MAIN_HAND) {
if (minecraft.gameSettings.thirdPersonView != 0
|| minecraft.player.getHeldItem(EnumHand.MAIN_HAND).func_190916_E() <= 0
|| minecraft.player.getHeldItem(EnumHand.MAIN_HAND).getItem() != InfernumItems.KNOWLEDGE_BOOK) {
reset();
return;
}
if ((minecraft.player.getHeldItem(EnumHand.OFF_HAND).equals(ItemStack.field_190927_a))) {
event.setCanceled(true);
try {
ticksOpen++;
doRender(event.getPartialTicks(), minecraft.player.getHeldItem(event.getHand()));
} catch (Throwable throwable) {
}
} else {
reset();
}
}
}
开发者ID:the-realest-stu,项目名称:Infernum,代码行数:25,代码来源:RenderKnowledgeTome.java
示例2: onRenderHand
import net.minecraftforge.client.event.RenderSpecificHandEvent; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
@SubscribeEvent(priority = EventPriority.HIGHEST)
public void onRenderHand(RenderSpecificHandEvent event)
{
Minecraft.getMinecraft();
AbstractClientPlayer abstractclientplayer = (AbstractClientPlayer) CrystalMod.proxy.getClientPlayer();
ExtendedPlayer ePlayer = ExtendedPlayerProvider.getExtendedPlayer(abstractclientplayer);
if(ePlayer !=null && ePlayer.getPlayerDisguiseUUID() !=null)
{
boolean flag = event.getHand() == EnumHand.MAIN_HAND;
EnumHandSide enumhandside = flag ? abstractclientplayer.getPrimaryHand() : abstractclientplayer.getPrimaryHand().opposite();
if (ItemStackTools.isNullStack(event.getItemStack()))
{
if (flag && !abstractclientplayer.isInvisible())
{
event.setCanceled(true);
GlStateManager.pushMatrix();
renderArmFirstPerson(event.getEquipProgress(), event.getSwingProgress(), enumhandside, ePlayer.isMini());
GlStateManager.popMatrix();
}
}
}
}
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:26,代码来源:DisguiseClientHandler.java
示例3: onRenderHand
import net.minecraftforge.client.event.RenderSpecificHandEvent; //导入依赖的package包/类
@SubscribeEvent
public static void onRenderHand(RenderSpecificHandEvent ev)
{
EntityPlayer player = Minecraft.getMinecraft().player;
if (!player.isSneaking() && ev.getItemStack().getItem() instanceof ItemParchment)
{
float f = player.getSwingProgress(ev.getPartialTicks());
float f1 = player.prevRotationPitch
+ (player.rotationPitch - player.prevRotationPitch) * ev.getPartialTicks();
ItemRenderer itemrenderer = Minecraft.getMinecraft().getItemRenderer();
float prevEquipProgress = ev.getHand() == EnumHand.MAIN_HAND ? itemrenderer.prevEquippedProgressMainHand
: itemrenderer.prevEquippedProgressOffHand;
float equipProgress = ev.getHand() == EnumHand.MAIN_HAND ? itemrenderer.equippedProgressMainHand
: itemrenderer.equippedProgressOffHand;
float f5 = 1.0F - (prevEquipProgress + (equipProgress - prevEquipProgress) * ev.getPartialTicks());
GlStateManager.pushMatrix();
GlStateManager.pushAttrib();
if (ev.getHand() == EnumHand.MAIN_HAND && player.getHeldItemOffhand().isEmpty())
{
GLHelper.renderParchmentFirstPerson(f1, f5, f, ev.getItemStack());
} else
{
EnumHandSide enumhandside = ev.getHand() == EnumHand.MAIN_HAND ? player.getPrimaryHand()
: player.getPrimaryHand().opposite();
GLHelper.renderParchmentFirstPersonSide(f5, enumhandside, f, ev.getItemStack());
}
GlStateManager.popAttrib();
GlStateManager.popMatrix();
ev.setCanceled(true);
}
}
开发者ID:raphydaphy,项目名称:ArcaneMagic,代码行数:38,代码来源:ClientEvents.java
示例4: renderSpecificHand
import net.minecraftforge.client.event.RenderSpecificHandEvent; //导入依赖的package包/类
@SubscribeEvent
public void renderSpecificHand(RenderSpecificHandEvent event) {
EntityPlayer player=Minecraft.getMinecraft().player;
if((event.getItemStack().getItem() instanceof ItemCloak && !WeaponsCapability.get(player).isFeign()
&& ((ItemCloak)event.getItemStack().getItem()).isFeignDeath(event.getItemStack(), player))) {
event.setCanceled(true);
}
}
开发者ID:rafradek,项目名称:Mods,代码行数:9,代码来源:TF2EventsClient.java
示例5: onRenderSpecificHand
import net.minecraftforge.client.event.RenderSpecificHandEvent; //导入依赖的package包/类
public static void onRenderSpecificHand(RenderSpecificHandEvent event)
{
if(event.getHand() == EnumHand.MAIN_HAND && event.getItemStack().isEmpty())
{
ItemStack is = Minecraft.getMinecraft().player.getHeldItem(EnumHand.OFF_HAND);
if(!is.isEmpty() && ItemHandler.isItemDualHanded(is))
{
event.setCanceled(true);
}
}
}
开发者ID:iChun,项目名称:iChunUtil,代码行数:12,代码来源:ItemRenderingHelper.java
示例6: renderSpecificFirstPersonHand
import net.minecraftforge.client.event.RenderSpecificHandEvent; //导入依赖的package包/类
public static boolean renderSpecificFirstPersonHand(EnumHand hand, float partialTicks, float interpPitch, float swingProgress, float equipProgress, ItemStack stack)
{
return MinecraftForge.EVENT_BUS.post(new RenderSpecificHandEvent(hand, partialTicks, interpPitch, swingProgress, equipProgress, stack));
}
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:5,代码来源:ForgeHooksClient.java
示例7: onRenderHand
import net.minecraftforge.client.event.RenderSpecificHandEvent; //导入依赖的package包/类
@SubscribeEvent
public void onRenderHand(RenderSpecificHandEvent event)
{
PlayerGloveRenderer.renderItemFirstPerson(Minecraft.getMinecraft().thePlayer, event.getPartialTicks(), event.getInterpolatedPitch(), event.getHand(), event.getSwingProgress(), event.getItemStack(), event.getEquipProgress());
}
开发者ID:Modding-Legacy,项目名称:Aether-Legacy,代码行数:6,代码来源:AetherClientEvents.java
示例8: onRenderSpecificHand
import net.minecraftforge.client.event.RenderSpecificHandEvent; //导入依赖的package包/类
@SubscribeEvent
@SideOnly(Side.CLIENT)
public static void onRenderSpecificHand(RenderSpecificHandEvent event) {
if (projectionState)
AlchemyEventSystem.markEventCanceled(event);
}
开发者ID:NekoCaffeine,项目名称:Alchemy,代码行数:7,代码来源:SingleProjection.java
示例9: onRenderSpecificHand
import net.minecraftforge.client.event.RenderSpecificHandEvent; //导入依赖的package包/类
@SubscribeEvent
public void onRenderSpecificHand(RenderSpecificHandEvent event)
{
ItemRenderingHelper.onRenderSpecificHand(event);
}
开发者ID:iChun,项目名称:iChunUtil,代码行数:6,代码来源:EventHandlerClient.java
注:本文中的net.minecraftforge.client.event.RenderSpecificHandEvent类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论