Java Code Examples for net.minecraftforge.client.event.RenderPlayerEvent#Pre
The following examples show how to use
net.minecraftforge.client.event.RenderPlayerEvent#Pre .
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: ClientProxy.java From GregTech with GNU Lesser General Public License v3.0 | 5 votes |
@SubscribeEvent public static void onPlayerRender(RenderPlayerEvent.Pre event) { AbstractClientPlayer clientPlayer = (AbstractClientPlayer) event.getEntityPlayer(); if (capeHoldersUUIDs.contains(clientPlayer.getUniqueID()) && clientPlayer.hasPlayerInfo() && clientPlayer.getLocationCape() == null) { NetworkPlayerInfo playerInfo = ObfuscationReflectionHelper.getPrivateValue(AbstractClientPlayer.class, clientPlayer, 0); Map<Type, ResourceLocation> playerTextures = ObfuscationReflectionHelper.getPrivateValue(NetworkPlayerInfo.class, playerInfo, 1); playerTextures.put(Type.CAPE, GREGTECH_CAPE_TEXTURE); } }
Example 2
Source File: ClientEventHandler.java From Et-Futurum with The Unlicense | 5 votes |
@SubscribeEvent public void renderPlayerEventPre(RenderPlayerEvent.Pre event) { if (EtFuturum.enableTransparentAmour) { OpenGLHelper.enableBlend(); OpenGLHelper.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); } }
Example 3
Source File: ProxyClient.java From WearableBackpacks with MIT License | 5 votes |
@SubscribeEvent(priority=EventPriority.LOWEST) public void onRenderPlayerPre(RenderPlayerEvent.Pre event) { EntityPlayer player = event.getEntityPlayer(); if ((BackpackHelper.getBackpack(player) == null) || !player.isWearing(EnumPlayerModelParts.CAPE)) return; // Disable player rendering for players with equipped backpacks // by temporarily setting whether they are wearing it to false. setWearing(player, EnumPlayerModelParts.CAPE, false); _disabledCape = true; }
Example 4
Source File: WaifuESP.java From ForgeHax with MIT License | 4 votes |
@SubscribeEvent public void onRenderPlayer(RenderPlayerEvent.Pre event) { if (noRenderPlayers.getAsBoolean() && !event.getEntity().equals(MC.player)) { event.setCanceled(true); } }
Example 5
Source File: ClientEventHandler.java From PneumaticCraft with GNU General Public License v3.0 | 4 votes |
@SubscribeEvent public void onPlayerRender(RenderPlayerEvent.Pre event){ playerRenderPartialTick = event.partialRenderTick; if(!Config.useHelmetModel && !DateEventHandler.isIronManEvent() || event.entityPlayer.getCurrentArmor(3) == null || event.entityPlayer.getCurrentArmor(3).getItem() != Itemss.pneumaticHelmet) return; event.renderer.modelBipedMain.bipedHead.showModel = false; }