Jump to content

Model Lighting


Recommended Posts

Happy New Years,




I have this block and no matter what I do. I can't get the lightning to normalize across all the faces. Id would also be happy if it shaded downwards across all the faces. But my preference is for uniform lighting from all sides.


There is a whole slew of things I tried thats commented out in the code.



public void renderBlock(TileEntitySmallBarrel tl, World world, int x, int y,int z, Block block) {

Tessellator tessellator = Tessellator.instance;


//float f = block.getLightOpacity(world, x, y, z);

////int l = world.getLightBrightnessForSkyBlocks(x, y, z, 0);

//int l1 = l % 65536;

//int l2 = l / 65536;

//tessellator.setColorOpaque_F(f, f, f);

//tessellator.setNormal(0.0F, 1.0F, 0.0F);

//OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit,(float) l1, (float) l2);

//int brightness = Blocks.stone.getMixedBrightnessForBlock(world, x, y, z);

//int lightValue = block.getMixedBrightnessForBlock(world, x, y, z);


//tessellator.setColorOpaque_F(0.8F, 0.8F, 0.8F);



float scale = 0.28F;

GL11.glScalef(scale, scale, scale);


GL11.glRotatef(31F, 0.0F, 1.0F, 0.0F);





Link to comment
Share on other sites

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.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

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