mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Changed cloud rendering on clouds to be more cloudy
This commit is contained in:
parent
4de736507d
commit
259b620f45
2 changed files with 28 additions and 6 deletions
|
@ -114,11 +114,22 @@ public class EntityCloud extends EntityFlying implements IAnimals {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the render brightness of this entity based on the surrounding world light values.
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int getBrightnessForRender() {
|
public int getBrightnessForRender() {
|
||||||
return 0xF00000;
|
return 0xF00000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the brightness percentage for this entity based on the surrounding world light values.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public float getBrightness() {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean canDespawn() {
|
protected boolean canDespawn() {
|
||||||
return !hasCustomName() && !getStationary() && !getOpaque();
|
return !hasCustomName() && !getStationary() && !getOpaque();
|
||||||
|
|
|
@ -33,17 +33,18 @@ public class RenderCloud extends RenderLiving<EntityCloud> {
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
GlStateManager.translate(0, -entity.height/entity.getCloudSize() + 0.3F, 0);
|
GlStateManager.translate(0, -entity.height/entity.getCloudSize() + 0.3F, 0);
|
||||||
|
|
||||||
GL11.glEnable(GL11.GL_BLEND);
|
GlStateManager.disableLighting();
|
||||||
|
GlStateManager.enableBlend();
|
||||||
|
|
||||||
Vec3d cloudColour = entity.world.getCloudColour(Minecraft.getMinecraft().getRenderPartialTicks());
|
GlStateManager.color(1, 1, 1, entity.getOpaque() ? 1 : 0.8F);
|
||||||
|
|
||||||
GL11.glColor4f((float)cloudColour.x, (float)cloudColour.y, (float)cloudColour.z, 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);
|
||||||
|
|
||||||
super.renderModel(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor);
|
super.renderModel(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor);
|
||||||
|
|
||||||
GL11.glDisable(GL11.GL_BLEND);
|
GlStateManager.disableBlend();
|
||||||
GL11.glColor4f(1, 1, 1, 1);
|
GlStateManager.enableLighting();
|
||||||
|
GlStateManager.color(1, 1, 1, 1);
|
||||||
|
|
||||||
GlStateManager.popMatrix();
|
GlStateManager.popMatrix();
|
||||||
}
|
}
|
||||||
|
@ -57,10 +58,20 @@ public class RenderCloud extends RenderLiving<EntityCloud> {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected int getColorMultiplier(EntityCloud par1EntityLivingBase, float yaw, float pitch) {
|
protected int getColorMultiplier(EntityCloud par1EntityLivingBase, float yaw, float pitch) {
|
||||||
return 25;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected float getDeathMaxRotation(EntityCloud par1EntityLivingBase) {
|
protected float getDeathMaxRotation(EntityCloud par1EntityLivingBase) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue