mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-17 10:24:23 +01:00
Use the world cloud tint when rendering clouds
This commit is contained in:
parent
b5e7bf673d
commit
1e9cfc92a7
1 changed files with 4 additions and 3 deletions
|
@ -1,9 +1,11 @@
|
|||
package com.minelittlepony.unicopia.render;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
|
@ -33,10 +35,9 @@ public class RenderCloud extends RenderLiving<EntityCloud> {
|
|||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
|
||||
if (!((EntityCloud)entity).getOpaque()) {
|
||||
GL11.glColor4f(1, 1, 1, 0.8F);
|
||||
}
|
||||
Vec3d cloudColour = entity.world.getCloudColour(Minecraft.getMinecraft().getRenderPartialTicks());
|
||||
|
||||
GL11.glColor4f((float)cloudColour.x, (float)cloudColour.y, (float)cloudColour.z, ((EntityCloud)entity).getOpaque() ? 1 : 0.8F);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
super.renderModel(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor);
|
||||
|
|
Loading…
Reference in a new issue