Posted October 20, 20159 yr So, I am using the ItemRenderer to render some symbols around the player. I wish for them to be blurred, but the ItemRenderer class ignores mcmeta files when using the function "ItemRenderer.renderItemIn2D". Is there any way to blur things rendered with ItemRenderer? Here's my code: @SideOnly(Side.CLIENT) public void render(ItemStack stack, EntityPlayer player, float partialTicks) { Minecraft mc = Minecraft.getMinecraft(); Tessellator tess = Tessellator.instance; Tessellator.renderingWorldRenderer = false; Random r = new Random(); GL11.glPushMatrix(); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); float alpha = ((float) Math.sin((player.ticksExisted + partialTicks) * 0.2F) * 0.5F + 0.5F) * 0.4F + 0.3F; double posX = player.prevPosX + (player.posX - player.prevPosX) * partialTicks; double posY = player.prevPosY + (player.posY - player.prevPosY) * partialTicks; double posZ = player.prevPosZ + (player.posZ - player.prevPosZ) * partialTicks; GL11.glTranslated(posX - RenderManager.renderPosX, posY - RenderManager.renderPosY, posZ - RenderManager.renderPosZ); float base = getRotationBase(stack); int angles = 360; int segAngles = angles / SEGMENTS; float shift = base - segAngles / 2; float u = 1F; float v = 0.25F; float s = 3F; float m = 0.8F; float y = v * s * 2; float y0 = 0; int light = 15728880; int lightmapX = light % 65536; int lightmapY = light / 65536; int segmentLookedAt = getSegmentLookedAt(stack, player); for(int seg = 0; seg < SEGMENTS; seg++) { boolean inside = false; float rotationAngle = (seg + 0.5F) * segAngles + shift; if(segmentLookedAt == seg) inside = true; GL11.glPushMatrix(); GL11.glRotatef(rotationAngle, 0F, 1F, 0F); GL11.glTranslatef((s * m), -0.75F, 0F); mc.renderEngine.bindTexture(TextureMap.locationItemsTexture); GL11.glScalef(0.75F, 0.75F, 0.75F); Random random = new Random(); if(segmentLookedAt == seg) OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lightmapX, lightmapY); GL11.glTranslatef(0F, ((float) Math.sin((player.ticksExisted + partialTicks) * 0.2F) * 0.5F + 0.5F) * 0.1F + 0.2F, 0.5F); IIcon icon = aspects[seg]; GL11.glRotatef(90F, 0F, 1F, 0F); GL11.glColor4f(1F, 1F, 1F, getWarpPoint(stack, seg).isValid() ? 0.9F : segmentLookedAt == seg ? 0.6F : 0.2F); float f = icon.getMinU(); float f1 = icon.getMaxU(); float f2 = icon.getMinV(); float f3 = icon.getMaxV(); ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 32F); GL11.glColor3f(1F, 1F, 1F); GL11.glPopMatrix(); } GL11.glPopMatrix(); } while(awake) { coffee++; }
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.