Jump to content

proudmoorn

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by proudmoorn

  1. Sorry! I thought I did! I do want it to be a continuous. Can you recommend an alternative method to look at for rendering? (I don't need examples, just a general gist will be enough)
  2. Biome, type of item used to cause it to explode, how far along in the Exploding process it is.
  3. The colors are dynamic though. So I'd have to define a state for every possible color combination that I want to implement, no?
  4. Once per lifetime of the block (which is destroyed after the process)
  5. The process is fairly fast. The leaves go to black, and from black to color in 2 seconds (or so)
  6. Hello, I'm attempting to change the color of a block (of leaves) dynamically based on how close they are to the end of a progress. I get the model of the leaf to render, but it always renders in greyscale, no matter how I try to modify the color. I've attached my TileEntityRenderer's render function, along with a lot of the debug code I've attempted. Color output looks like this: Color:-4665437 R:0.72156864 G:0.8117647 B:0.6392157 Any help is appreciated. @Override public void render(TileExplosiveLeaves te, double x, double y, double z, float partialTicks, int destroyStage, float alpha) { GlStateManager.pushMatrix(); GlStateManager.enableRescaleNormal(); RenderHelper.disableStandardItemLighting(); GlStateManager.enableColorMaterial(); int color = te.getColor().toInt(); float colorRed = (float) (color >> 16 & 255) / 255.0F; float colorGreen = (float) (color >> 8 & 255) / 255.0F; float colorBlue = (float) (color & 255) / 255.0F; float colorAlpha = (float) (color >> 24 & 255) / 255.0F; System.out.println("Color:" + color + " R:" + colorRed + " G:" + colorGreen + " B:" + colorBlue); // GlStateManager.resetColor(); // GL11.glColor3f(color.r, color.g, color.b); // GL11. GlStateManager.enableBlend(); // GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); World world = te.getWorld(); bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); Tessellator tessellator = Tessellator.getInstance(); tessellator.getBuffer().begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK); tessellator.getBuffer().color(colorRed, colorGreen, colorBlue, colorAlpha); Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelRenderer().renderModel( world, Minecraft.getMinecraft().getBlockRendererDispatcher().getModelForState(te.getLeafBlock()), world.getBlockState(te.getPos()), te.getPos(), Tessellator.getInstance().getBuffer(), false); tessellator.draw(); // RenderHelper.enableStandardItemLighting(); // GlStateManager.enableLighting(); GlStateManager.popMatrix(); GlStateManager.disableBlend();
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.