# Pastebin vWE344xR @Override public void doRender(Entity entity, double x, double y, double z, float entityYaw, float partialTicks) { super.doRender(entity, x, y, z, entityYaw, partialTicks); if (model == null) { try { model = ModelLoaderRegistry.getModel(new ResourceLocation("ltm", "entity/chest.b3d")); if (model instanceof IRetexturableModel) { model = ((IRetexturableModel) model).retexture(ImmutableMap.of("#chest", "entity/chest/normal")); } if (model instanceof IModelCustomData) { model = ((IModelCustomData) model).process(ImmutableMap.of("mesh", "[\"Base\", \"Lid\"]")); } } catch (IOException e) { Throwables.propagate(e); } } float progress = ((TestEntity) entity).frames / 30f; int k1 = (int) Math.floor(progress); int k2 = Math.min(k1 + 1, 10); IBakedModel bakedModel = model.bake(new B3DLoader.B3DState(null, k1, k2, progress % 1), DefaultVertexFormats.ITEM, (ResourceLocation location) -> Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(location.toString())); BlockPos pos = new BlockPos(entity.posX, entity.posY, entity.posZ); RenderHelper.disableStandardItemLighting(); GlStateManager.pushMatrix(); GlStateManager.translate((float) x, (float) y, (float) z); GlStateManager.rotate(180, 0, 0, 1); //GlStateManager.scale(-1.0F, -1.0F, 1.0F); Tessellator tessellator = Tessellator.getInstance(); WorldRenderer worldRenderer = tessellator.getWorldRenderer(); worldRenderer.func_181668_a(GL11.GL_QUADS, DefaultVertexFormats.BLOCK); worldRenderer.setTranslation(-pos.getX() - 0.5, -pos.getY() - 1.5, -pos.getZ() - 0.5); WorldRendererConsumer worldRendererConsumer = new WorldRendererConsumer(worldRenderer); //lighter.setParent(new WorldRendererConsumer(worldRenderer)); //lighter.setWorld(entity.worldObj); //lighter.setBlock(GameRegistry.findBlock(Reference.MOD_ID, blockName)); //lighter.setBlockPos(pos); List quads = bakedModel.getGeneralQuads(); if (!quads.isEmpty()) { for (BakedQuad quad : quads) { quad.pipe(worldRendererConsumer); } } for (EnumFacing side : EnumFacing.values()) { quads = bakedModel.getFaceQuads(side); if (!quads.isEmpty()) { for (BakedQuad quad : quads) { quad.pipe(worldRendererConsumer); } } } /*worldRenderer.func_181662_b(0, 1, 0).func_181669_b(0xFF, 0xFF, 0xFF, 0xFF).func_181673_a(0, 0).func_181671_a(240, 0).func_181675_d(); worldRenderer.func_181662_b(0, 1, 1).func_181669_b(0xFF, 0xFF, 0xFF, 0xFF).func_181673_a(0, 1).func_181671_a(240, 0).func_181675_d(); worldRenderer.func_181662_b(1, 1, 1).func_181669_b(0xFF, 0xFF, 0xFF, 0xFF).func_181673_a(1, 1).func_181671_a(240, 0).func_181675_d(); worldRenderer.func_181662_b(1, 1, 0).func_181669_b(0xFF, 0xFF, 0xFF, 0xFF).func_181673_a(1, 0).func_181671_a(240, 0).func_181675_d(); */ worldRenderer.setTranslation(0, 0, 0); tessellator.draw(); GlStateManager.popMatrix(); RenderHelper.enableStandardItemLighting(); }