Skip to content

Commit

Permalink
refactor(planets): don't render Earth & Sun on Venus
Browse files Browse the repository at this point in the history
  • Loading branch information
ROMVoid95 committed Jan 9, 2023
1 parent 0f2c621 commit b222b25
Showing 1 changed file with 1 addition and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ public void render(float partialTicks, WorldClient world, Minecraft mc)
float b = f8 * f18;
float a = afloat[3] * 2 / f18;
worldRenderer1.pos(0.0D, 100.0D, 0.0D).color(r, g, b, a).endVertex();
byte b0 = 16;
r = afloat[0] * f18;
g = afloat[1] * f18;
b = afloat[2] * f18 / 20.0F;
Expand Down Expand Up @@ -212,7 +211,7 @@ public void render(float partialTicks, WorldClient world, Minecraft mc)
a = 0.0F;

// Render larger sun aura
f10 = 40.0F;
f10 = 20.0F;
worldRenderer1.pos(-f10, 100.0D, -f10).color(r, g, b, a).endVertex();
worldRenderer1.pos(0, 100.0D, (double) -f10 * 1.5F).color(r, g, b, a).endVertex();
worldRenderer1.pos(f10, 100.0D, -f10).color(r, g, b, a).endVertex();
Expand Down Expand Up @@ -249,30 +248,6 @@ public void render(float partialTicks, WorldClient world, Minecraft mc)
tessellator1.draw();
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.1F);
f10 = this.sunSize;
mc.renderEngine.bindTexture(SkyProviderVenus.sunTexture);
worldRenderer1.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX);
worldRenderer1.pos(-f10, 100.0D, -f10).tex(0.0D, 0.0D).endVertex();
worldRenderer1.pos(f10, 100.0D, -f10).tex(1.0D, 0.0D).endVertex();
worldRenderer1.pos(f10, 100.0D, f10).tex(1.0D, 1.0D).endVertex();
worldRenderer1.pos(-f10, 100.0D, f10).tex(0.0D, 1.0D).endVertex();
tessellator1.draw();

// Render earth
f10 = 0.5F;
GL11.glScalef(0.6F, 0.6F, 0.6F);
GL11.glRotatef(40.0F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(200F, 1.0F, 0.0F, 0.0F);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1F);
FMLClientHandler.instance().getClient().renderEngine.bindTexture(SkyProviderVenus.overworldTexture);
worldRenderer1.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX);
worldRenderer1.pos(-f10, -100.0D, f10).tex(0, 1.0).endVertex();
worldRenderer1.pos(f10, -100.0D, f10).tex(1.0, 1.0).endVertex();
worldRenderer1.pos(f10, -100.0D, -f10).tex(1.0, 0).endVertex();
worldRenderer1.pos(-f10, -100.0D, -f10).tex(0, 0).endVertex();
tessellator1.draw();

GL11.glDisable(GL11.GL_TEXTURE_2D);

GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glDisable(GL11.GL_BLEND);
Expand Down Expand Up @@ -390,11 +365,6 @@ private void renderStars()
var2.draw();
}

private Vec3d getCustomSkyColor()
{
return new Vec3d(0.26796875D, 0.1796875D, 0.0D);
}

public float getSkyBrightness(float par1)
{
final float var2 = FMLClientHandler.instance().getClient().world.getCelestialAngle(par1);
Expand Down

0 comments on commit b222b25

Please sign in to comment.