mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-01 11:36:43 +01:00
Fixed lighting on clouds
This commit is contained in:
parent
9834507162
commit
d9dbf56b64
1 changed files with 4 additions and 1 deletions
|
@ -9,6 +9,7 @@ import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.minelittlepony.unicopia.entity.EntityCloud;
|
import com.minelittlepony.unicopia.entity.EntityCloud;
|
||||||
import com.minelittlepony.unicopia.model.ModelCloud;
|
import com.minelittlepony.unicopia.model.ModelCloud;
|
||||||
|
import com.minelittlepony.util.WorldHelper;
|
||||||
|
|
||||||
public class RenderCloud extends RenderLiving<EntityCloud> {
|
public class RenderCloud extends RenderLiving<EntityCloud> {
|
||||||
private static final ResourceLocation cloud = new ResourceLocation("unicopia", "textures/entity/clouds.png");
|
private static final ResourceLocation cloud = new ResourceLocation("unicopia", "textures/entity/clouds.png");
|
||||||
|
@ -36,7 +37,9 @@ public class RenderCloud extends RenderLiving<EntityCloud> {
|
||||||
GlStateManager.disableLighting();
|
GlStateManager.disableLighting();
|
||||||
GlStateManager.enableBlend();
|
GlStateManager.enableBlend();
|
||||||
|
|
||||||
GlStateManager.color(1, 1, 1, entity.getOpaque() ? 1 : 0.8F);
|
float brightness = Math.max(WorldHelper.getDaylightBrightness(entity.getEntityWorld(), 0) * 3, 0.05F);
|
||||||
|
|
||||||
|
GlStateManager.color(brightness, brightness, brightness, entity.getOpaque() ? 1 : 0.8F);
|
||||||
|
|
||||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue