Java Code Examples for net.minecraftforge.client.event.RenderPlayerEvent#Post
The following examples show how to use
net.minecraftforge.client.event.RenderPlayerEvent#Post .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CapeHandler.java From Wizardry with GNU Lesser General Public License v3.0 | 6 votes |
@SubscribeEvent public void onPlayerRender(RenderPlayerEvent.Post event) { EntityPlayer player = event.getEntityPlayer(); float delta = event.getPartialRenderTick(); if (ClientConfigValues.renderCape && !player.isInvisible() && !VanishTracker.isVanished(player) && !player.isElytraFlying() && !player.isPlayerSleeping() && delta != 1) { RenderCape cape = getCape(player); if (cape.isPresent(player)) { cape.render( player, player.posX - cape.posX - TileEntityRendererDispatcher.staticPlayerX, player.posY - cape.posY - TileEntityRendererDispatcher.staticPlayerY, player.posZ - cape.posZ - TileEntityRendererDispatcher.staticPlayerZ, delta ); } } }
Example 2
Source File: RenderComponents.java From AdvancedRocketry with MIT License | 6 votes |
@SubscribeEvent public void renderPostSpecial(RenderPlayerEvent.Post event) { //RenderJet pack //RenderJetPack pack = new RenderJetPack(); ItemStack chest = event.getEntityLiving().getItemStackFromSlot(EntityEquipmentSlot.CHEST); if(chest != null && chest.getItem() instanceof IModularArmor) { for(ItemStack stack : ((IModularArmor)chest.getItem()).getComponents(chest)) { if(stack.getItem() == AdvancedRocketryItems.itemJetpack) { GL11.glPushMatrix(); float f = event.getEntityPlayer().prevRotationYaw + (event.getEntityPlayer().rotationYaw - event.getEntityPlayer().prevRotationYaw); GL11.glRotatef(f + 180, 0,-1,0); //pack.render(event.getEntityLiving(), 0, 0, 0, 0, 0, 0); GL11.glPopMatrix(); } } } }
Example 3
Source File: ProxyClient.java From WearableBackpacks with MIT License | 5 votes |
@SubscribeEvent(priority=EventPriority.HIGHEST) public void onRenderPlayerPost(RenderPlayerEvent.Post event) { if (!_disabledCape) return; // Reenable cape rendering if it was disabled. EntityPlayer player = event.getEntityPlayer(); setWearing(player, EnumPlayerModelParts.CAPE, true); _disabledCape = false; }
Example 4
Source File: EssentialsMissingHandlerClient.java From Cyberware with MIT License | 4 votes |
@SideOnly(Side.CLIENT) @SubscribeEvent public void handleMissingSkin(RenderPlayerEvent.Post event) { if (CyberwareConfig.RENDER) { event.getRenderer().getMainModel().bipedLeftArm.isHidden = false; event.getRenderer().getMainModel().bipedRightArm.isHidden = false; event.getRenderer().getMainModel().bipedLeftLeg.isHidden = false; event.getRenderer().getMainModel().bipedRightLeg.isHidden = false; EntityPlayer p = event.getEntityPlayer(); if (CyberwareAPI.hasCapability(p)) { ICyberwareUserData cyberware = CyberwareAPI.getCapability(p); if (pants.containsKey(p.getEntityId())) { p.inventory.armorInventory[1] = pants.get(p.getEntityId()); pants.remove(p.getEntityId()); } if (shoes.containsKey(p.getEntityId())) { p.inventory.armorInventory[0] = shoes.get(p.getEntityId()); shoes.remove(p.getEntityId()); } if (!cyberware.hasEssential(EnumSlot.ARM, EnumSide.LEFT)) { event.getRenderer().getMainModel().bipedLeftArm.isHidden = false; if (mainHand.containsKey(p.getEntityId())) { p.inventory.mainInventory[p.inventory.currentItem] = mainHand.get(p.getEntityId()); p.inventory.offHandInventory[0] = offHand.get(p.getEntityId()); mainHand.remove(p.getEntityId()); offHand.remove(p.getEntityId()); } } if (!cyberware.hasEssential(EnumSlot.ARM, EnumSide.RIGHT)) { event.getRenderer().getMainModel().bipedRightArm.isHidden = false; if (mainHand.containsKey(p.getEntityId())) { p.inventory.mainInventory[p.inventory.currentItem] = mainHand.get(p.getEntityId()); p.inventory.offHandInventory[0] = offHand.get(p.getEntityId()); mainHand.remove(p.getEntityId()); offHand.remove(p.getEntityId()); } } } } }
Example 5
Source File: ClientEventHandler.java From Et-Futurum with The Unlicense | 4 votes |
@SubscribeEvent public void renderPlayerEventPost(RenderPlayerEvent.Post event) { if (EtFuturum.enableTransparentAmour) OpenGLHelper.disableBlend(); }
Example 6
Source File: ClientEventHandler.java From PneumaticCraft with GNU General Public License v3.0 | 4 votes |
@SubscribeEvent public void onPlayerRender(RenderPlayerEvent.Post event){ event.renderer.modelBipedMain.bipedHead.showModel = true; }