Posted December 16, 20204 yr I'm trying to make my entity's model be bright at a fixed light value. In 1.12.2 I was able to override getBrightnessForRender(), but this method is no longer there in 1.16.3. I've looked through the EntityRenderer class and couldn't find anything there either. Anyone know how I could achieve this? Btw getBrightness has nothing to do with how the entity is rendered, I checked. Edited December 16, 20204 yr by Turtledove
December 16, 20204 yr Hi Off the top of my head I don't recall, but you might get some way forward looking at this: https://github.com/TheGreyGhost/MinecraftByExample/blob/master/src/main/java/minecraftbyexample/mbe81_entity_projectile/BoomerangRenderer.java packedlightIn is probably the parameter of interest I think (i.e. in the render method) packedLight is the skylight+blocklight value https://greyminecraftcoder.blogspot.com/2020/04/lighting-1144.html (used to be called "mixedBrightness") -TGG
December 16, 20204 yr Author 13 hours ago, TheGreyGhost said: Hi Off the top of my head I don't recall, but you might get some way forward looking at this: https://github.com/TheGreyGhost/MinecraftByExample/blob/master/src/main/java/minecraftbyexample/mbe81_entity_projectile/BoomerangRenderer.java packedlightIn is probably the parameter of interest I think (i.e. in the render method) packedLight is the skylight+blocklight value https://greyminecraftcoder.blogspot.com/2020/04/lighting-1144.html (used to be called "mixedBrightness") -TGG Yeah looks like that's about right. But now the problem is that I need every face of the entity's model to be lit up the same, but gl11 calls like GL11.glEnable(GL11.GL_MAX_LIGHTS) or even GL11.GLDisable(GL11.GL_LIGHTING) doesn't work.
December 17, 20204 yr Howdy GL11.glEnable(GL11.GL_MAX_LIGHTS) and all those don't work any more, they're incorporated into your RenderTypeBuffer. The reason is that the drawing is no longer done in-line, it is accumulated into the appropriate buffer (eg transparent blocks, entities, lines, etc) and each buffer is then drawn in one shot. If you want to mess with the rendering settings, you need to choose a different RenderTypeBuffer or create your own custom. Some more information here: https://gist.github.com/williewillus/30d7e3f775fe93c503bddf054ef3f93e If you need every face of the entity model to be lit up the same, you can modify your renderer to render all of the faces more brightly? I'm not sure why that's a problem? -TGG
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.