public void renderKamuiBlack() { // Modified copy of RenderItem.renderItem(stack, transformtype) Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); Minecraft.getMinecraft().renderEngine.getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).setBlurMipmap(false, false); IBakedModel model = Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getItemModel(renderStack); GlStateManager.enableRescaleNormal(); GlStateManager.alphaFunc(516, 0.1F); GlStateManager.enableBlend(); GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0); GlStateManager.pushMatrix(); model = net.minecraftforge.client.ForgeHooksClient.handleCameraTransforms(model, ItemCameraTransforms.TransformType.NONE, false); renderModel(model, renderStack, 0xFF00004C); GlStateManager.cullFace(GlStateManager.CullFace.BACK); GlStateManager.popMatrix(); GlStateManager.disableRescaleNormal(); GlStateManager.disableBlend(); Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); Minecraft.getMinecraft().renderEngine.getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).restoreLastBlurMipmap(); }
private void finishBreaking() { Minecraft.getMinecraft().getTextureManager().getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).restoreLastBlurMipmap(); GlStateManager.disableAlpha(); GlStateManager.doPolygonOffset(0.0F, 0.0F); GlStateManager.disablePolygonOffset(); GlStateManager.enableAlpha(); GlStateManager.depthMask(true); GlStateManager.popMatrix(); }
private static void finishBreaking() { GlStateManager.disableAlpha(); GlStateManager.doPolygonOffset(0.0F, 0.0F); GlStateManager.disablePolygonOffset(); GlStateManager.enableAlpha(); GlStateManager.depthMask(true); GlStateManager.popMatrix(); Minecraft.getMinecraft().getTextureManager().getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).restoreLastBlurMipmap(); }
private void renderElements(Multiblock mb, Iterable<? extends BlockPos> blocks, Vector4f eye) { GlStateManager.pushMatrix(); GlStateManager.color(1F, 1F, 1F, 1F); GlStateManager.translate(0, 0, -1); TileEntityRendererDispatcher.instance.entityX = eye.x; TileEntityRendererDispatcher.instance.entityY = eye.y; TileEntityRendererDispatcher.instance.entityZ = eye.z; TileEntityRendererDispatcher.staticPlayerX = eye.x; TileEntityRendererDispatcher.staticPlayerY = eye.y; TileEntityRendererDispatcher.staticPlayerZ = eye.z; BlockRenderLayer oldRenderLayer = MinecraftForgeClient.getRenderLayer(); for (BlockRenderLayer layer : BlockRenderLayer.values()) { if (layer == BlockRenderLayer.TRANSLUCENT) { doTileEntityRenderPass(mb, blocks, 0); } doWorldRenderPass(mb, blocks, layer, eye); if (layer == BlockRenderLayer.TRANSLUCENT) { doTileEntityRenderPass(mb, blocks, 1); } } ForgeHooksClient.setRenderLayer(oldRenderLayer); ForgeHooksClient.setRenderPass(-1); setGlStateForPass(0); mc.getTextureManager().getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).restoreLastBlurMipmap(); GlStateManager.popMatrix(); }
Minecraft.getMinecraft().getTextureManager().getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).restoreLastBlurMipmap(); GlStateManager.disableRescaleNormal(); RenderHelper.disableStandardItemLighting();
@SideOnly(Side.CLIENT) public static void renderItemWithoutScrewingWithColors(ItemStack stack){ if(StackUtil.isValid(stack)){ Minecraft mc = Minecraft.getMinecraft(); RenderItem renderer = mc.getRenderItem(); TextureManager manager = mc.getTextureManager(); IBakedModel model = renderer.getItemModelWithOverrides(stack, null, null); manager.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); manager.getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).setBlurMipmap(false, false); GlStateManager.enableRescaleNormal(); GlStateManager.enableBlend(); GlStateManager.pushMatrix(); model = ForgeHooksClient.handleCameraTransforms(model, TransformType.FIXED, false); renderer.renderItem(stack, model); GlStateManager.cullFace(GlStateManager.CullFace.BACK); GlStateManager.popMatrix(); GlStateManager.disableRescaleNormal(); GlStateManager.disableBlend(); manager.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); manager.getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).restoreLastBlurMipmap(); } }
@SideOnly(Side.CLIENT) private static void renderItemModelIntoGUI(RenderItem render, ItemStack stack, int x, int y, IBakedModel bakedmodel) { GlStateManager.pushMatrix(); textureManager.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); textureManager.getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).setBlurMipmap(false, false); GlStateManager.enableRescaleNormal(); GlStateManager.enableAlpha(); GlStateManager.alphaFunc(516, 0.1F); GlStateManager.enableBlend(); GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); render.setupGuiTransform(x, y, bakedmodel.isGui3d()); bakedmodel = net.minecraftforge.client.ForgeHooksClient.handleCameraTransforms(bakedmodel, ItemCameraTransforms.TransformType.GUI, false); renderItem(render, stack, bakedmodel); GlStateManager.disableAlpha(); GlStateManager.disableRescaleNormal(); GlStateManager.disableLighting(); GlStateManager.popMatrix(); textureManager.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); textureManager.getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).restoreLastBlurMipmap(); }
this.renderManager.renderEngine.getTexture(this.getEntityTexture(entity)).restoreLastBlurMipmap();
GlStateManager.popMatrix(); mc.renderEngine.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); mc.renderEngine.getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).restoreLastBlurMipmap();
public void draw(BuildingVertexUploader vertexUploader) { GlStateManager.disableAlpha(); vertexUploader.draw(renderer.getWorldRendererByLayer(BlockRenderLayer.SOLID)); GlStateManager.enableAlpha(); vertexUploader.draw(renderer.getWorldRendererByLayer(BlockRenderLayer.CUTOUT_MIPPED)); Minecraft.getMinecraft().getTextureManager().getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).setBlurMipmap(false, false); vertexUploader.draw(renderer.getWorldRendererByLayer(BlockRenderLayer.CUTOUT)); Minecraft.getMinecraft().getTextureManager().getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).restoreLastBlurMipmap(); GlStateManager.disableBlend(); GlStateManager.enableCull(); GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO); GlStateManager.alphaFunc(516, 0.1F); GlStateManager.enableBlend(); GlStateManager.depthMask(false); Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); GlStateManager.shadeModel(7425); vertexUploader.draw(renderer.getWorldRendererByLayer(BlockRenderLayer.TRANSLUCENT)); GlStateManager.disableBlend(); GlStateManager.depthMask(true); }
textureManager.getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).restoreLastBlurMipmap();
textureManager.getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).restoreLastBlurMipmap();
textureManager.getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).restoreLastBlurMipmap();
textureManager.getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).restoreLastBlurMipmap();
GlStateManager.popMatrix(); mc.getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); mc.getTextureManager().getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).restoreLastBlurMipmap();
GlStateManager.disableLighting(); Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); Minecraft.getMinecraft().getTextureManager().getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).restoreLastBlurMipmap(); GlStateManager.disableBlend(); GlStateManager.color(1F, 1F, 1F, 1F);
this.texManager.getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).restoreLastBlurMipmap();
this.mc.getTextureManager().getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).setBlurMipmap(false, false); renderBlockLayer(BlockRenderLayer.CUTOUT, partialTicks, PASS, entity); this.mc.getTextureManager().getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).restoreLastBlurMipmap(); GlStateManager.disableBlend(); GlStateManager.shadeModel(GL11.GL_FLAT);