Optifine Clouds
This commit is contained in:
parent
4cb7e5b9c0
commit
577e01f0ac
|
@ -137,6 +137,14 @@ public class Config {
|
||||||
public static int getUpdatesPerFrame() {
|
public static int getUpdatesPerFrame() {
|
||||||
return Minecraft.getMinecraft().gameSettings.ofChunkUpdates;
|
return Minecraft.getMinecraft().gameSettings.ofChunkUpdates;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isCloudsFancy() {
|
||||||
|
return Minecraft.getMinecraft().gameSettings.ofClouds != 0 ? Minecraft.getMinecraft().gameSettings.ofClouds == 2 : Minecraft.getMinecraft().gameSettings.fancyGraphics;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isCloudsOff() {
|
||||||
|
return Minecraft.getMinecraft().gameSettings.ofClouds != 0 ? Minecraft.getMinecraft().gameSettings.ofClouds == 3 : false;
|
||||||
|
}
|
||||||
|
|
||||||
public static int limit(int p_limit_0_, int p_limit_1_, int p_limit_2_) {
|
public static int limit(int p_limit_0_, int p_limit_1_, int p_limit_2_) {
|
||||||
return p_limit_0_ < p_limit_1_ ? p_limit_1_ : (p_limit_0_ > p_limit_2_ ? p_limit_2_ : p_limit_0_);
|
return p_limit_0_ < p_limit_1_ ? p_limit_1_ : (p_limit_0_ > p_limit_2_ ? p_limit_2_ : p_limit_0_);
|
||||||
|
|
71
src/main/java/net/PeytonPlayz585/shadow/gui/GuiDetails.java
Normal file
71
src/main/java/net/PeytonPlayz585/shadow/gui/GuiDetails.java
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
package net.PeytonPlayz585.shadow.gui;
|
||||||
|
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.gui.GuiButton;
|
||||||
|
import net.minecraft.client.gui.GuiOptionButton;
|
||||||
|
import net.minecraft.client.gui.GuiOptionSlider;
|
||||||
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
|
import net.minecraft.client.resources.I18n;
|
||||||
|
import net.minecraft.client.settings.GameSettings;
|
||||||
|
|
||||||
|
public class GuiDetails extends GuiScreen {
|
||||||
|
private GuiScreen prevScreen;
|
||||||
|
protected String title;
|
||||||
|
private GameSettings settings;
|
||||||
|
//private static GameSettings.Options[] enumOptions = new GameSettings.Options[] {GameSettings.Options.CLOUDS, GameSettings.Options.CLOUD_HEIGHT, GameSettings.Options.TREES, GameSettings.Options.RAIN, GameSettings.Options.SKY, GameSettings.Options.STARS, GameSettings.Options.SUN_MOON, GameSettings.Options.SHOW_CAPES, GameSettings.Options.TRANSLUCENT_BLOCKS, GameSettings.Options.HELD_ITEM_TOOLTIPS, GameSettings.Options.DROPPED_ITEMS, GameSettings.Options.ENTITY_SHADOWS, GameSettings.Options.VIGNETTE, GameSettings.Options.DYNAMIC_FOV};
|
||||||
|
private static GameSettings.Options[] enumOptions = new GameSettings.Options[] { GameSettings.Options.CLOUDS, GameSettings.Options.CLOUD_HEIGHT};
|
||||||
|
|
||||||
|
public GuiDetails(GuiScreen p_i47_1_) {
|
||||||
|
this.prevScreen = p_i47_1_;
|
||||||
|
this.settings = Minecraft.getMinecraft().gameSettings;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
|
||||||
|
* window resizes, the buttonList is cleared beforehand.
|
||||||
|
*/
|
||||||
|
public void initGui() {
|
||||||
|
this.title = I18n.format("Detail Settings", new Object[0]);
|
||||||
|
this.buttonList.clear();
|
||||||
|
|
||||||
|
for (int i = 0; i < enumOptions.length; ++i) {
|
||||||
|
GameSettings.Options gamesettings$options = enumOptions[i];
|
||||||
|
int j = width / 2 - 155 + i % 2 * 160;
|
||||||
|
int k = height / 6 + 21 * (i / 2) - 12;
|
||||||
|
|
||||||
|
if (!gamesettings$options.getEnumFloat()) {
|
||||||
|
this.buttonList.add(new GuiOptionButton(gamesettings$options.returnEnumOrdinal(), j, k, gamesettings$options, this.settings.getKeyBinding(gamesettings$options)));
|
||||||
|
} else {
|
||||||
|
this.buttonList.add(new GuiOptionSlider(gamesettings$options.returnEnumOrdinal(), j, k, gamesettings$options));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.buttonList.add(new GuiButton(200, width / 2 - 100, height / 6 + 168 + 11, I18n.format("gui.done", new Object[0])));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called by the controls from the buttonList when activated. (Mouse pressed for buttons)
|
||||||
|
*/
|
||||||
|
protected void actionPerformed(GuiButton button) {
|
||||||
|
if (button.enabled) {
|
||||||
|
if (button.id < 200 && button instanceof GuiOptionButton) {
|
||||||
|
this.settings.setOptionValue(((GuiOptionButton)button).returnEnumOptions(), 1);
|
||||||
|
button.displayString = this.settings.getKeyBinding(GameSettings.Options.getEnumOptions(button.id));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (button.id == 200) {
|
||||||
|
this.mc.gameSettings.saveOptions();
|
||||||
|
this.mc.displayGuiScreen(this.prevScreen);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Draws the screen and all the components in it. Args : mouseX, mouseY, renderPartialTicks
|
||||||
|
*/
|
||||||
|
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
|
||||||
|
this.drawDefaultBackground();
|
||||||
|
this.drawCenteredString(this.fontRendererObj, this.title, width / 2, 15, 16777215);
|
||||||
|
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||||
|
}
|
||||||
|
}
|
|
@ -24,7 +24,7 @@ public class GuiPerformance extends GuiScreen {
|
||||||
* window resizes, the buttonList is cleared beforehand.
|
* window resizes, the buttonList is cleared beforehand.
|
||||||
*/
|
*/
|
||||||
public void initGui() {
|
public void initGui() {
|
||||||
this.title = I18n.format("of.options.performanceTitle", new Object[0]);
|
this.title = I18n.format("Performance Settings", new Object[0]);
|
||||||
this.buttonList.clear();
|
this.buttonList.clear();
|
||||||
|
|
||||||
for (int i = 0; i < enumOptions.length; ++i) {
|
for (int i = 0; i < enumOptions.length; ++i) {
|
||||||
|
|
|
@ -0,0 +1,89 @@
|
||||||
|
package net.PeytonPlayz585.shadow.other;
|
||||||
|
|
||||||
|
import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
|
||||||
|
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||||
|
import net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.renderer.GLAllocation;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
|
||||||
|
public class CloudRenderer {
|
||||||
|
private Minecraft mc;
|
||||||
|
private boolean updated = false;
|
||||||
|
private boolean renderFancy = false;
|
||||||
|
int cloudTickCounter;
|
||||||
|
float partialTicks;
|
||||||
|
private int glListClouds = -1;
|
||||||
|
private int cloudTickCounterUpdate = 0;
|
||||||
|
private double cloudPlayerX = 0.0D;
|
||||||
|
private double cloudPlayerY = 0.0D;
|
||||||
|
private double cloudPlayerZ = 0.0D;
|
||||||
|
|
||||||
|
public CloudRenderer(Minecraft p_i28_1_) {
|
||||||
|
this.mc = p_i28_1_;
|
||||||
|
this.glListClouds = GLAllocation.generateDisplayLists();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void prepareToRender(boolean p_prepareToRender_1_, int p_prepareToRender_2_, float p_prepareToRender_3_) {
|
||||||
|
if (this.renderFancy != p_prepareToRender_1_) {
|
||||||
|
this.updated = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.renderFancy = p_prepareToRender_1_;
|
||||||
|
this.cloudTickCounter = p_prepareToRender_2_;
|
||||||
|
this.partialTicks = p_prepareToRender_3_;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean shouldUpdateGlList() {
|
||||||
|
if (!this.updated) {
|
||||||
|
return true;
|
||||||
|
} else if (this.cloudTickCounter >= this.cloudTickCounterUpdate + 20) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
Entity entity = this.mc.getRenderViewEntity();
|
||||||
|
boolean flag = this.cloudPlayerY + (double)entity.getEyeHeight() < 128.0D + (double)(this.mc.gameSettings.ofCloudsHeight * 128.0F);
|
||||||
|
boolean flag1 = entity.prevPosY + (double)entity.getEyeHeight() < 128.0D + (double)(this.mc.gameSettings.ofCloudsHeight * 128.0F);
|
||||||
|
return flag1 != flag;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void startUpdateGlList() {
|
||||||
|
EaglercraftGPU.glNewList(this.glListClouds, RealOpenGLEnums.GL_COMPILE);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void endUpdateGlList() {
|
||||||
|
EaglercraftGPU.glEndList();
|
||||||
|
this.cloudTickCounterUpdate = this.cloudTickCounter;
|
||||||
|
this.cloudPlayerX = this.mc.getRenderViewEntity().prevPosX;
|
||||||
|
this.cloudPlayerY = this.mc.getRenderViewEntity().prevPosY;
|
||||||
|
this.cloudPlayerZ = this.mc.getRenderViewEntity().prevPosZ;
|
||||||
|
this.updated = true;
|
||||||
|
GlStateManager.resetColor();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void renderGlList() {
|
||||||
|
Entity entity = this.mc.getRenderViewEntity();
|
||||||
|
double d0 = entity.prevPosX + (entity.posX - entity.prevPosX) * (double)this.partialTicks;
|
||||||
|
double d1 = entity.prevPosY + (entity.posY - entity.prevPosY) * (double)this.partialTicks;
|
||||||
|
double d2 = entity.prevPosZ + (entity.posZ - entity.prevPosZ) * (double)this.partialTicks;
|
||||||
|
double d3 = (double)((float)(this.cloudTickCounter - this.cloudTickCounterUpdate) + this.partialTicks);
|
||||||
|
float f = (float)(d0 - this.cloudPlayerX + d3 * 0.03D);
|
||||||
|
float f1 = (float)(d1 - this.cloudPlayerY);
|
||||||
|
float f2 = (float)(d2 - this.cloudPlayerZ);
|
||||||
|
GlStateManager.pushMatrix();
|
||||||
|
|
||||||
|
if (this.renderFancy) {
|
||||||
|
GlStateManager.translate(-f / 12.0F, -f1, -f2 / 12.0F);
|
||||||
|
} else {
|
||||||
|
GlStateManager.translate(-f, -f1, -f2);
|
||||||
|
}
|
||||||
|
|
||||||
|
GlStateManager.callList(this.glListClouds);
|
||||||
|
GlStateManager.popMatrix();
|
||||||
|
GlStateManager.resetColor();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void reset() {
|
||||||
|
this.updated = false;
|
||||||
|
}
|
||||||
|
}
|
|
@ -140,6 +140,10 @@ public class GuiVideoSettings extends GuiScreen {
|
||||||
if(parGuiButton.id == 212) {
|
if(parGuiButton.id == 212) {
|
||||||
this.mc.displayGuiScreen(new GuiPerformance(this));
|
this.mc.displayGuiScreen(new GuiPerformance(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(parGuiButton.id == 201) {
|
||||||
|
this.mc.displayGuiScreen(new GuiDetails(this));
|
||||||
|
}
|
||||||
|
|
||||||
if (this.guiGameSettings.guiScale != i) {
|
if (this.guiGameSettings.guiScale != i) {
|
||||||
ScaledResolution scaledresolution = new ScaledResolution(this.mc);
|
ScaledResolution scaledresolution = new ScaledResolution(this.mc);
|
||||||
|
|
|
@ -174,6 +174,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
|
||||||
private GameOverlayFramebuffer overlayFramebuffer;
|
private GameOverlayFramebuffer overlayFramebuffer;
|
||||||
private float eagPartialTicks = 0.0f;
|
private float eagPartialTicks = 0.0f;
|
||||||
public boolean fogStandard = false;
|
public boolean fogStandard = false;
|
||||||
|
private float clipDistance = 128.0F;
|
||||||
|
|
||||||
public EntityRenderer(Minecraft mcIn, IResourceManager resourceManagerIn) {
|
public EntityRenderer(Minecraft mcIn, IResourceManager resourceManagerIn) {
|
||||||
this.useShader = false;
|
this.useShader = false;
|
||||||
|
@ -598,16 +599,24 @@ public class EntityRenderer implements IResourceManagerReloadListener {
|
||||||
if (this.mc.gameSettings.anaglyph) {
|
if (this.mc.gameSettings.anaglyph) {
|
||||||
GlStateManager.translate((float) (-(pass * 2 - 1)) * f, 0.0F, 0.0F);
|
GlStateManager.translate((float) (-(pass * 2 - 1)) * f, 0.0F, 0.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.clipDistance = this.farPlaneDistance * 2.0F;
|
||||||
|
|
||||||
|
if (this.clipDistance < 173.0F) {
|
||||||
|
this.clipDistance = 173.0F;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.mc.theWorld.provider.getDimensionId() == 1) {
|
||||||
|
this.clipDistance = 256.0F;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.cameraZoom != 1.0D) {
|
if (this.cameraZoom != 1.0D) {
|
||||||
GlStateManager.translate((float) this.cameraYaw, (float) (-this.cameraPitch), 0.0F);
|
GlStateManager.translate((float) this.cameraYaw, (float) (-this.cameraPitch), 0.0F);
|
||||||
GlStateManager.scale(this.cameraZoom, this.cameraZoom, 1.0D);
|
GlStateManager.scale(this.cameraZoom, this.cameraZoom, 1.0D);
|
||||||
}
|
}
|
||||||
|
|
||||||
float farPlane = this.farPlaneDistance * 2.0f * MathHelper.SQRT_2;
|
GlStateManager.gluPerspective(this.getFOVModifier(partialTicks, true), (float)this.mc.displayWidth / (float)this.mc.displayHeight, 0.05F, this.clipDistance);
|
||||||
GlStateManager.gluPerspective(this.getFOVModifier(partialTicks, true),
|
DeferredStateManager.setGBufferNearFarPlanes(0.05f, clipDistance);
|
||||||
(float) this.mc.displayWidth / (float) this.mc.displayHeight, 0.05F, farPlane);
|
|
||||||
DeferredStateManager.setGBufferNearFarPlanes(0.05f, farPlane);
|
|
||||||
GlStateManager.matrixMode(GL_MODELVIEW);
|
GlStateManager.matrixMode(GL_MODELVIEW);
|
||||||
GlStateManager.loadIdentity();
|
GlStateManager.loadIdentity();
|
||||||
if (this.mc.gameSettings.anaglyph) {
|
if (this.mc.gameSettings.anaglyph) {
|
||||||
|
@ -1159,23 +1168,20 @@ public class EntityRenderer implements IResourceManagerReloadListener {
|
||||||
this.mc.mcProfiler.endStartSection("sky");
|
this.mc.mcProfiler.endStartSection("sky");
|
||||||
GlStateManager.matrixMode(GL_PROJECTION);
|
GlStateManager.matrixMode(GL_PROJECTION);
|
||||||
GlStateManager.loadIdentity();
|
GlStateManager.loadIdentity();
|
||||||
GlStateManager.gluPerspective(this.getFOVModifier(partialTicks, true),
|
GlStateManager.gluPerspective(this.getFOVModifier(partialTicks, true), (float)this.mc.displayWidth / (float)this.mc.displayHeight, 0.05F, this.clipDistance);
|
||||||
(float) this.mc.displayWidth / (float) this.mc.displayHeight, 0.05F, this.farPlaneDistance * 4.0F);
|
|
||||||
GlStateManager.matrixMode(GL_MODELVIEW);
|
GlStateManager.matrixMode(GL_MODELVIEW);
|
||||||
renderglobal.renderSky(partialTicks, pass);
|
renderglobal.renderSky(partialTicks, pass);
|
||||||
GlStateManager.matrixMode(GL_PROJECTION);
|
GlStateManager.matrixMode(GL_PROJECTION);
|
||||||
GlStateManager.loadIdentity();
|
GlStateManager.loadIdentity();
|
||||||
GlStateManager.gluPerspective(this.getFOVModifier(partialTicks, true),
|
GlStateManager.gluPerspective(this.getFOVModifier(partialTicks, true), (float)this.mc.displayWidth / (float)this.mc.displayHeight, 0.05F, this.clipDistance);
|
||||||
(float) this.mc.displayWidth / (float) this.mc.displayHeight, 0.05F,
|
|
||||||
this.farPlaneDistance * MathHelper.SQRT_2);
|
|
||||||
GlStateManager.matrixMode(GL_MODELVIEW);
|
GlStateManager.matrixMode(GL_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setupFog(0, partialTicks);
|
this.setupFog(0, partialTicks);
|
||||||
GlStateManager.shadeModel(GL_SMOOTH);
|
GlStateManager.shadeModel(GL_SMOOTH);
|
||||||
if (entity.posY + (double) entity.getEyeHeight() < 128.0D) {
|
if (entity.posY + (double)entity.getEyeHeight() < 128.0D + (double)(this.mc.gameSettings.ofCloudsHeight * 128.0F)) {
|
||||||
this.renderCloudsCheck(renderglobal, partialTicks, pass);
|
this.renderCloudsCheck(renderglobal, partialTicks, pass);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.mc.mcProfiler.endStartSection("prepareterrain");
|
this.mc.mcProfiler.endStartSection("prepareterrain");
|
||||||
this.setupFog(0, partialTicks);
|
this.setupFog(0, partialTicks);
|
||||||
|
@ -1280,10 +1286,10 @@ public class EntityRenderer implements IResourceManagerReloadListener {
|
||||||
GlStateManager.enableCull();
|
GlStateManager.enableCull();
|
||||||
GlStateManager.disableBlend();
|
GlStateManager.disableBlend();
|
||||||
GlStateManager.disableFog();
|
GlStateManager.disableFog();
|
||||||
if (entity.posY + (double) entity.getEyeHeight() >= 128.0D) {
|
if (entity.posY + (double)entity.getEyeHeight() >= 128.0D + (double)(this.mc.gameSettings.ofCloudsHeight * 128.0F)) {
|
||||||
this.mc.mcProfiler.endStartSection("aboveClouds");
|
this.mc.mcProfiler.endStartSection("aboveClouds");
|
||||||
this.renderCloudsCheck(renderglobal, partialTicks, pass);
|
this.renderCloudsCheck(renderglobal, partialTicks, pass);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.mc.mcProfiler.endStartSection("hand");
|
this.mc.mcProfiler.endStartSection("hand");
|
||||||
Shadow.moduleManager.onRender();
|
Shadow.moduleManager.onRender();
|
||||||
|
@ -1296,26 +1302,22 @@ public class EntityRenderer implements IResourceManagerReloadListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void renderCloudsCheck(RenderGlobal renderGlobalIn, float partialTicks, int pass) {
|
private void renderCloudsCheck(RenderGlobal renderGlobalIn, float partialTicks, int pass) {
|
||||||
if (this.mc.gameSettings.func_181147_e() != 0) {
|
if (this.mc.gameSettings.renderDistanceChunks >= 4 && !Config.isCloudsOff()) {
|
||||||
this.mc.mcProfiler.endStartSection("clouds");
|
this.mc.mcProfiler.endStartSection("clouds");
|
||||||
GlStateManager.matrixMode(GL_PROJECTION);
|
GlStateManager.matrixMode(5889);
|
||||||
GlStateManager.loadIdentity();
|
GlStateManager.loadIdentity();
|
||||||
GlStateManager.gluPerspective(this.getFOVModifier(partialTicks, true),
|
GlStateManager.gluPerspective(this.getFOVModifier(partialTicks, true), (float)this.mc.displayWidth / (float)this.mc.displayHeight, 0.05F, this.clipDistance * 4.0F);
|
||||||
(float) this.mc.displayWidth / (float) this.mc.displayHeight, 0.05F, this.farPlaneDistance * 4.0F);
|
GlStateManager.matrixMode(5888);
|
||||||
GlStateManager.matrixMode(GL_MODELVIEW);
|
GlStateManager.pushMatrix();
|
||||||
GlStateManager.pushMatrix();
|
this.setupFog(0, partialTicks);
|
||||||
this.setupFog(0, partialTicks);
|
renderGlobalIn.renderClouds(partialTicks, pass);
|
||||||
renderGlobalIn.renderClouds(partialTicks, pass);
|
GlStateManager.disableFog();
|
||||||
GlStateManager.disableFog();
|
GlStateManager.popMatrix();
|
||||||
GlStateManager.popMatrix();
|
GlStateManager.matrixMode(5889);
|
||||||
GlStateManager.matrixMode(GL_PROJECTION);
|
GlStateManager.loadIdentity();
|
||||||
GlStateManager.loadIdentity();
|
GlStateManager.gluPerspective(this.getFOVModifier(partialTicks, true), (float)this.mc.displayWidth / (float)this.mc.displayHeight, 0.05F, this.clipDistance);
|
||||||
GlStateManager.gluPerspective(this.getFOVModifier(partialTicks, true),
|
GlStateManager.matrixMode(5888);
|
||||||
(float) this.mc.displayWidth / (float) this.mc.displayHeight, 0.05F,
|
}
|
||||||
this.farPlaneDistance * MathHelper.SQRT_2);
|
|
||||||
GlStateManager.matrixMode(GL_MODELVIEW);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addRainParticles() {
|
private void addRainParticles() {
|
||||||
|
|
|
@ -13,6 +13,7 @@ import java.util.Map;
|
||||||
import net.PeytonPlayz585.shadow.Config;
|
import net.PeytonPlayz585.shadow.Config;
|
||||||
import net.PeytonPlayz585.shadow.CustomSky;
|
import net.PeytonPlayz585.shadow.CustomSky;
|
||||||
import net.PeytonPlayz585.shadow.opengl.OpenGLManager;
|
import net.PeytonPlayz585.shadow.opengl.OpenGLManager;
|
||||||
|
import net.PeytonPlayz585.shadow.other.CloudRenderer;
|
||||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||||
import net.lax1dude.eaglercraft.v1_8.HString;
|
import net.lax1dude.eaglercraft.v1_8.HString;
|
||||||
import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
||||||
|
@ -190,8 +191,10 @@ public class RenderGlobal implements IWorldAccess, IResourceManagerReloadListene
|
||||||
|
|
||||||
public Set chunksToResortTransparency = new LinkedHashSet();
|
public Set chunksToResortTransparency = new LinkedHashSet();
|
||||||
public Set chunksToUpdateForced = new LinkedHashSet();
|
public Set chunksToUpdateForced = new LinkedHashSet();
|
||||||
|
private CloudRenderer cloudRenderer;
|
||||||
|
|
||||||
public RenderGlobal(Minecraft mcIn) {
|
public RenderGlobal(Minecraft mcIn) {
|
||||||
|
this.cloudRenderer = new CloudRenderer(mcIn);
|
||||||
this.mc = mcIn;
|
this.mc = mcIn;
|
||||||
this.renderManager = mcIn.getRenderManager();
|
this.renderManager = mcIn.getRenderManager();
|
||||||
this.renderEngine = mcIn.getTextureManager();
|
this.renderEngine = mcIn.getTextureManager();
|
||||||
|
@ -1488,79 +1491,73 @@ public class RenderGlobal implements IWorldAccess, IResourceManagerReloadListene
|
||||||
}
|
}
|
||||||
|
|
||||||
public void renderClouds(float partialTicks, int pass) {
|
public void renderClouds(float partialTicks, int pass) {
|
||||||
if (this.mc.theWorld.provider.isSurfaceWorld()) {
|
if (!Config.isCloudsOff()) {
|
||||||
if (this.mc.gameSettings.func_181147_e() == 2) {
|
if (this.mc.theWorld.provider.isSurfaceWorld()) {
|
||||||
this.renderCloudsFancy(partialTicks, pass);
|
if (Config.isCloudsFancy()) {
|
||||||
} else {
|
this.renderCloudsFancy(partialTicks, pass);
|
||||||
GlStateManager.disableCull();
|
} else {
|
||||||
float f = (float) (this.mc.getRenderViewEntity().lastTickPosY
|
this.cloudRenderer.prepareToRender(false, this.cloudTickCounter, partialTicks);
|
||||||
+ (this.mc.getRenderViewEntity().posY - this.mc.getRenderViewEntity().lastTickPosY)
|
partialTicks = 0.0F;
|
||||||
* (double) partialTicks);
|
GlStateManager.disableCull();
|
||||||
boolean flag = true;
|
float f9 = (float)(this.mc.getRenderViewEntity().lastTickPosY + (this.mc.getRenderViewEntity().posY - this.mc.getRenderViewEntity().lastTickPosY) * (double)partialTicks);
|
||||||
boolean flag1 = true;
|
boolean flag = true;
|
||||||
Tessellator tessellator = Tessellator.getInstance();
|
boolean flag1 = true;
|
||||||
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
Tessellator tessellator = Tessellator.getInstance();
|
||||||
this.renderEngine.bindTexture(locationCloudsPng);
|
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
||||||
GlStateManager.enableBlend();
|
this.renderEngine.bindTexture(locationCloudsPng);
|
||||||
GlStateManager.tryBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, 1, 0);
|
GlStateManager.enableBlend();
|
||||||
Vec3 vec3 = this.theWorld.getCloudColour(partialTicks);
|
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
|
||||||
float f1 = (float) vec3.xCoord;
|
|
||||||
float f2 = (float) vec3.yCoord;
|
|
||||||
float f3 = (float) vec3.zCoord;
|
|
||||||
if (pass != 2) {
|
|
||||||
float f4 = (f1 * 30.0F + f2 * 59.0F + f3 * 11.0F) / 100.0F;
|
|
||||||
float f5 = (f1 * 30.0F + f2 * 70.0F) / 100.0F;
|
|
||||||
float f6 = (f1 * 30.0F + f3 * 70.0F) / 100.0F;
|
|
||||||
f1 = f4;
|
|
||||||
f2 = f5;
|
|
||||||
f3 = f6;
|
|
||||||
}
|
|
||||||
|
|
||||||
float f10 = 4.8828125E-4F;
|
if (this.cloudRenderer.shouldUpdateGlList()) {
|
||||||
double d2 = (double) ((float) this.cloudTickCounter + partialTicks);
|
this.cloudRenderer.startUpdateGlList();
|
||||||
double d0 = this.mc.getRenderViewEntity().prevPosX
|
Vec3 vec3 = this.theWorld.getCloudColour(partialTicks);
|
||||||
+ (this.mc.getRenderViewEntity().posX - this.mc.getRenderViewEntity().prevPosX)
|
float f = (float)vec3.xCoord;
|
||||||
* (double) partialTicks
|
float f1 = (float)vec3.yCoord;
|
||||||
+ d2 * 0.029999999329447746D;
|
float f2 = (float)vec3.zCoord;
|
||||||
double d1 = this.mc.getRenderViewEntity().prevPosZ
|
|
||||||
+ (this.mc.getRenderViewEntity().posZ - this.mc.getRenderViewEntity().prevPosZ)
|
|
||||||
* (double) partialTicks;
|
|
||||||
int i = MathHelper.floor_double(d0 / 2048.0D);
|
|
||||||
int j = MathHelper.floor_double(d1 / 2048.0D);
|
|
||||||
d0 = d0 - (double) (i * 2048);
|
|
||||||
d1 = d1 - (double) (j * 2048);
|
|
||||||
float f7 = this.theWorld.provider.getCloudHeight() - f + 0.33F;
|
|
||||||
float f8 = (float) (d0 * 4.8828125E-4D);
|
|
||||||
float f9 = (float) (d1 * 4.8828125E-4D);
|
|
||||||
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
|
|
||||||
|
|
||||||
for (int k = -256; k < 256; k += 32) {
|
if (pass != 2) {
|
||||||
for (int l = -256; l < 256; l += 32) {
|
float f3 = (f * 30.0F + f1 * 59.0F + f2 * 11.0F) / 100.0F;
|
||||||
worldrenderer.pos((double) (k + 0), (double) f7, (double) (l + 32))
|
float f4 = (f * 30.0F + f1 * 70.0F) / 100.0F;
|
||||||
.tex((double) ((float) (k + 0) * 4.8828125E-4F + f8),
|
float f5 = (f * 30.0F + f2 * 70.0F) / 100.0F;
|
||||||
(double) ((float) (l + 32) * 4.8828125E-4F + f9))
|
f = f3;
|
||||||
.color(f1, f2, f3, 0.8F).endVertex();
|
f1 = f4;
|
||||||
worldrenderer.pos((double) (k + 32), (double) f7, (double) (l + 32))
|
f2 = f5;
|
||||||
.tex((double) ((float) (k + 32) * 4.8828125E-4F + f8),
|
}
|
||||||
(double) ((float) (l + 32) * 4.8828125E-4F + f9))
|
|
||||||
.color(f1, f2, f3, 0.8F).endVertex();
|
|
||||||
worldrenderer.pos((double) (k + 32), (double) f7, (double) (l + 0))
|
|
||||||
.tex((double) ((float) (k + 32) * 4.8828125E-4F + f8),
|
|
||||||
(double) ((float) (l + 0) * 4.8828125E-4F + f9))
|
|
||||||
.color(f1, f2, f3, 0.8F).endVertex();
|
|
||||||
worldrenderer.pos((double) (k + 0), (double) f7, (double) (l + 0))
|
|
||||||
.tex((double) ((float) (k + 0) * 4.8828125E-4F + f8),
|
|
||||||
(double) ((float) (l + 0) * 4.8828125E-4F + f9))
|
|
||||||
.color(f1, f2, f3, 0.8F).endVertex();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tessellator.draw();
|
float f10 = 4.8828125E-4F;
|
||||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
double d2 = (double)((float)this.cloudTickCounter + partialTicks);
|
||||||
GlStateManager.disableBlend();
|
double d0 = this.mc.getRenderViewEntity().prevPosX + (this.mc.getRenderViewEntity().posX - this.mc.getRenderViewEntity().prevPosX) * (double)partialTicks + d2 * 0.029999999329447746D;
|
||||||
GlStateManager.enableCull();
|
double d1 = this.mc.getRenderViewEntity().prevPosZ + (this.mc.getRenderViewEntity().posZ - this.mc.getRenderViewEntity().prevPosZ) * (double)partialTicks;
|
||||||
}
|
int i = MathHelper.floor_double(d0 / 2048.0D);
|
||||||
}
|
int j = MathHelper.floor_double(d1 / 2048.0D);
|
||||||
|
d0 = d0 - (double)(i * 2048);
|
||||||
|
d1 = d1 - (double)(j * 2048);
|
||||||
|
float f6 = this.theWorld.provider.getCloudHeight() - f9 + 0.33F;
|
||||||
|
f6 = f6 + this.mc.gameSettings.ofCloudsHeight * 128.0F;
|
||||||
|
float f7 = (float)(d0 * 4.8828125E-4D);
|
||||||
|
float f8 = (float)(d1 * 4.8828125E-4D);
|
||||||
|
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
|
||||||
|
|
||||||
|
for (int k = -256; k < 256; k += 32) {
|
||||||
|
for (int l = -256; l < 256; l += 32) {
|
||||||
|
worldrenderer.pos((double)(k + 0), (double)f6, (double)(l + 32)).tex((double)((float)(k + 0) * 4.8828125E-4F + f7), (double)((float)(l + 32) * 4.8828125E-4F + f8)).color(f, f1, f2, 0.8F).endVertex();
|
||||||
|
worldrenderer.pos((double)(k + 32), (double)f6, (double)(l + 32)).tex((double)((float)(k + 32) * 4.8828125E-4F + f7), (double)((float)(l + 32) * 4.8828125E-4F + f8)).color(f, f1, f2, 0.8F).endVertex();
|
||||||
|
worldrenderer.pos((double)(k + 32), (double)f6, (double)(l + 0)).tex((double)((float)(k + 32) * 4.8828125E-4F + f7), (double)((float)(l + 0) * 4.8828125E-4F + f8)).color(f, f1, f2, 0.8F).endVertex();
|
||||||
|
worldrenderer.pos((double)(k + 0), (double)f6, (double)(l + 0)).tex((double)((float)(k + 0) * 4.8828125E-4F + f7), (double)((float)(l + 0) * 4.8828125E-4F + f8)).color(f, f1, f2, 0.8F).endVertex();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tessellator.draw();
|
||||||
|
this.cloudRenderer.endUpdateGlList();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.cloudRenderer.renderGlList();
|
||||||
|
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
|
GlStateManager.disableBlend();
|
||||||
|
GlStateManager.enableCull();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**+
|
/**+
|
||||||
|
@ -1571,250 +1568,151 @@ public class RenderGlobal implements IWorldAccess, IResourceManagerReloadListene
|
||||||
}
|
}
|
||||||
|
|
||||||
private void renderCloudsFancy(float partialTicks, int pass) {
|
private void renderCloudsFancy(float partialTicks, int pass) {
|
||||||
GlStateManager.disableCull();
|
this.cloudRenderer.prepareToRender(true, this.cloudTickCounter, partialTicks);
|
||||||
float f = (float) (this.mc.getRenderViewEntity().lastTickPosY
|
partialTicks = 0.0F;
|
||||||
+ (this.mc.getRenderViewEntity().posY - this.mc.getRenderViewEntity().lastTickPosY)
|
GlStateManager.disableCull();
|
||||||
* (double) partialTicks);
|
float f = (float)(this.mc.getRenderViewEntity().lastTickPosY + (this.mc.getRenderViewEntity().posY - this.mc.getRenderViewEntity().lastTickPosY) * (double)partialTicks);
|
||||||
Tessellator tessellator = Tessellator.getInstance();
|
Tessellator tessellator = Tessellator.getInstance();
|
||||||
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
||||||
float f1 = 12.0F;
|
float f1 = 12.0F;
|
||||||
float f2 = 4.0F;
|
float f2 = 4.0F;
|
||||||
double d0 = (double) ((float) this.cloudTickCounter + partialTicks);
|
double d0 = (double)((float)this.cloudTickCounter + partialTicks);
|
||||||
double d1 = (this.mc.getRenderViewEntity().prevPosX
|
double d1 = (this.mc.getRenderViewEntity().prevPosX + (this.mc.getRenderViewEntity().posX - this.mc.getRenderViewEntity().prevPosX) * (double)partialTicks + d0 * 0.029999999329447746D) / 12.0D;
|
||||||
+ (this.mc.getRenderViewEntity().posX - this.mc.getRenderViewEntity().prevPosX) * (double) partialTicks
|
double d2 = (this.mc.getRenderViewEntity().prevPosZ + (this.mc.getRenderViewEntity().posZ - this.mc.getRenderViewEntity().prevPosZ) * (double)partialTicks) / 12.0D + 0.33000001311302185D;
|
||||||
+ d0 * 0.029999999329447746D) / 12.0D;
|
float f3 = this.theWorld.provider.getCloudHeight() - f + 0.33F;
|
||||||
double d2 = (this.mc.getRenderViewEntity().prevPosZ
|
f3 = f3 + this.mc.gameSettings.ofCloudsHeight * 128.0F;
|
||||||
+ (this.mc.getRenderViewEntity().posZ - this.mc.getRenderViewEntity().prevPosZ) * (double) partialTicks)
|
int i = MathHelper.floor_double(d1 / 2048.0D);
|
||||||
/ 12.0D + 0.33000001311302185D;
|
int j = MathHelper.floor_double(d2 / 2048.0D);
|
||||||
float f3 = this.theWorld.provider.getCloudHeight() - f + 0.33F;
|
d1 = d1 - (double)(i * 2048);
|
||||||
int i = MathHelper.floor_double(d1 / 2048.0D);
|
d2 = d2 - (double)(j * 2048);
|
||||||
int j = MathHelper.floor_double(d2 / 2048.0D);
|
this.renderEngine.bindTexture(locationCloudsPng);
|
||||||
d1 = d1 - (double) (i * 2048);
|
GlStateManager.enableBlend();
|
||||||
d2 = d2 - (double) (j * 2048);
|
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
|
||||||
this.renderEngine.bindTexture(locationCloudsPng);
|
Vec3 vec3 = this.theWorld.getCloudColour(partialTicks);
|
||||||
GlStateManager.enableBlend();
|
float f4 = (float)vec3.xCoord;
|
||||||
GlStateManager.tryBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, 1, 0);
|
float f5 = (float)vec3.yCoord;
|
||||||
Vec3 vec3 = this.theWorld.getCloudColour(partialTicks);
|
float f6 = (float)vec3.zCoord;
|
||||||
float f4 = (float) vec3.xCoord;
|
|
||||||
float f5 = (float) vec3.yCoord;
|
|
||||||
float f6 = (float) vec3.zCoord;
|
|
||||||
if (pass != 2) {
|
|
||||||
float f7 = (f4 * 30.0F + f5 * 59.0F + f6 * 11.0F) / 100.0F;
|
|
||||||
float f8 = (f4 * 30.0F + f5 * 70.0F) / 100.0F;
|
|
||||||
float f9 = (f4 * 30.0F + f6 * 70.0F) / 100.0F;
|
|
||||||
f4 = f7;
|
|
||||||
f5 = f8;
|
|
||||||
f6 = f9;
|
|
||||||
}
|
|
||||||
|
|
||||||
float f26 = f4 * 0.9F;
|
if (pass != 2) {
|
||||||
float f27 = f5 * 0.9F;
|
float f7 = (f4 * 30.0F + f5 * 59.0F + f6 * 11.0F) / 100.0F;
|
||||||
float f28 = f6 * 0.9F;
|
float f8 = (f4 * 30.0F + f5 * 70.0F) / 100.0F;
|
||||||
float f10 = f4 * 0.7F;
|
float f9 = (f4 * 30.0F + f6 * 70.0F) / 100.0F;
|
||||||
float f11 = f5 * 0.7F;
|
f4 = f7;
|
||||||
float f12 = f6 * 0.7F;
|
f5 = f8;
|
||||||
float f13 = f4 * 0.8F;
|
f6 = f9;
|
||||||
float f14 = f5 * 0.8F;
|
}
|
||||||
float f15 = f6 * 0.8F;
|
|
||||||
float f16 = 0.00390625F;
|
|
||||||
float f17 = (float) MathHelper.floor_double(d1) * 0.00390625F;
|
|
||||||
float f18 = (float) MathHelper.floor_double(d2) * 0.00390625F;
|
|
||||||
float f19 = (float) (d1 - (double) MathHelper.floor_double(d1));
|
|
||||||
float f20 = (float) (d2 - (double) MathHelper.floor_double(d2));
|
|
||||||
boolean flag = true;
|
|
||||||
boolean flag1 = true;
|
|
||||||
float f21 = 9.765625E-4F;
|
|
||||||
GlStateManager.scale(12.0F, 1.0F, 12.0F);
|
|
||||||
|
|
||||||
for (int k = 0; k < 2; ++k) {
|
float f26 = f4 * 0.9F;
|
||||||
if (k == 0) {
|
float f27 = f5 * 0.9F;
|
||||||
GlStateManager.colorMask(false, false, false, false);
|
float f28 = f6 * 0.9F;
|
||||||
} else {
|
float f10 = f4 * 0.7F;
|
||||||
switch (pass) {
|
float f11 = f5 * 0.7F;
|
||||||
case 0:
|
float f12 = f6 * 0.7F;
|
||||||
GlStateManager.colorMask(false, true, true, true);
|
float f13 = f4 * 0.8F;
|
||||||
break;
|
float f14 = f5 * 0.8F;
|
||||||
case 1:
|
float f15 = f6 * 0.8F;
|
||||||
GlStateManager.colorMask(true, false, false, true);
|
float f16 = 0.00390625F;
|
||||||
break;
|
float f17 = (float)MathHelper.floor_double(d1) * 0.00390625F;
|
||||||
case 2:
|
float f18 = (float)MathHelper.floor_double(d2) * 0.00390625F;
|
||||||
GlStateManager.colorMask(true, true, true, true);
|
float f19 = (float)(d1 - (double)MathHelper.floor_double(d1));
|
||||||
}
|
float f20 = (float)(d2 - (double)MathHelper.floor_double(d2));
|
||||||
}
|
boolean flag = true;
|
||||||
|
boolean flag1 = true;
|
||||||
|
float f21 = 9.765625E-4F;
|
||||||
|
GlStateManager.scale(12.0F, 1.0F, 12.0F);
|
||||||
|
|
||||||
for (int l = -3; l <= 4; ++l) {
|
for (int k = 0; k < 2; ++k) {
|
||||||
for (int i1 = -3; i1 <= 4; ++i1) {
|
if (k == 0) {
|
||||||
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR_NORMAL);
|
GlStateManager.colorMask(false, false, false, false);
|
||||||
float f22 = (float) (l * 8);
|
} else {
|
||||||
float f23 = (float) (i1 * 8);
|
switch (pass) {
|
||||||
float f24 = f22 - f19;
|
case 0:
|
||||||
float f25 = f23 - f20;
|
GlStateManager.colorMask(false, true, true, true);
|
||||||
if (f3 > -5.0F) {
|
break;
|
||||||
worldrenderer.pos((double) (f24 + 0.0F), (double) (f3 + 0.0F), (double) (f25 + 8.0F))
|
|
||||||
.tex((double) ((f22 + 0.0F) * 0.00390625F + f17),
|
|
||||||
(double) ((f23 + 8.0F) * 0.00390625F + f18))
|
|
||||||
.color(f10, f11, f12, 0.8F).normal(0.0F, -1.0F, 0.0F).endVertex();
|
|
||||||
worldrenderer.pos((double) (f24 + 8.0F), (double) (f3 + 0.0F), (double) (f25 + 8.0F))
|
|
||||||
.tex((double) ((f22 + 8.0F) * 0.00390625F + f17),
|
|
||||||
(double) ((f23 + 8.0F) * 0.00390625F + f18))
|
|
||||||
.color(f10, f11, f12, 0.8F).normal(0.0F, -1.0F, 0.0F).endVertex();
|
|
||||||
worldrenderer.pos((double) (f24 + 8.0F), (double) (f3 + 0.0F), (double) (f25 + 0.0F))
|
|
||||||
.tex((double) ((f22 + 8.0F) * 0.00390625F + f17),
|
|
||||||
(double) ((f23 + 0.0F) * 0.00390625F + f18))
|
|
||||||
.color(f10, f11, f12, 0.8F).normal(0.0F, -1.0F, 0.0F).endVertex();
|
|
||||||
worldrenderer.pos((double) (f24 + 0.0F), (double) (f3 + 0.0F), (double) (f25 + 0.0F))
|
|
||||||
.tex((double) ((f22 + 0.0F) * 0.00390625F + f17),
|
|
||||||
(double) ((f23 + 0.0F) * 0.00390625F + f18))
|
|
||||||
.color(f10, f11, f12, 0.8F).normal(0.0F, -1.0F, 0.0F).endVertex();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (f3 <= 5.0F) {
|
case 1:
|
||||||
worldrenderer
|
GlStateManager.colorMask(true, false, false, true);
|
||||||
.pos((double) (f24 + 0.0F), (double) (f3 + 4.0F - 9.765625E-4F), (double) (f25 + 8.0F))
|
break;
|
||||||
.tex((double) ((f22 + 0.0F) * 0.00390625F + f17),
|
|
||||||
(double) ((f23 + 8.0F) * 0.00390625F + f18))
|
|
||||||
.color(f4, f5, f6, 0.8F).normal(0.0F, 1.0F, 0.0F).endVertex();
|
|
||||||
worldrenderer
|
|
||||||
.pos((double) (f24 + 8.0F), (double) (f3 + 4.0F - 9.765625E-4F), (double) (f25 + 8.0F))
|
|
||||||
.tex((double) ((f22 + 8.0F) * 0.00390625F + f17),
|
|
||||||
(double) ((f23 + 8.0F) * 0.00390625F + f18))
|
|
||||||
.color(f4, f5, f6, 0.8F).normal(0.0F, 1.0F, 0.0F).endVertex();
|
|
||||||
worldrenderer
|
|
||||||
.pos((double) (f24 + 8.0F), (double) (f3 + 4.0F - 9.765625E-4F), (double) (f25 + 0.0F))
|
|
||||||
.tex((double) ((f22 + 8.0F) * 0.00390625F + f17),
|
|
||||||
(double) ((f23 + 0.0F) * 0.00390625F + f18))
|
|
||||||
.color(f4, f5, f6, 0.8F).normal(0.0F, 1.0F, 0.0F).endVertex();
|
|
||||||
worldrenderer
|
|
||||||
.pos((double) (f24 + 0.0F), (double) (f3 + 4.0F - 9.765625E-4F), (double) (f25 + 0.0F))
|
|
||||||
.tex((double) ((f22 + 0.0F) * 0.00390625F + f17),
|
|
||||||
(double) ((f23 + 0.0F) * 0.00390625F + f18))
|
|
||||||
.color(f4, f5, f6, 0.8F).normal(0.0F, 1.0F, 0.0F).endVertex();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (l > -1) {
|
case 2:
|
||||||
for (int j1 = 0; j1 < 8; ++j1) {
|
GlStateManager.colorMask(true, true, true, true);
|
||||||
worldrenderer
|
}
|
||||||
.pos((double) (f24 + (float) j1 + 0.0F), (double) (f3 + 0.0F),
|
}
|
||||||
(double) (f25 + 8.0F))
|
|
||||||
.tex((double) ((f22 + (float) j1 + 0.5F) * 0.00390625F + f17),
|
|
||||||
(double) ((f23 + 8.0F) * 0.00390625F + f18))
|
|
||||||
.color(f26, f27, f28, 0.8F).normal(-1.0F, 0.0F, 0.0F).endVertex();
|
|
||||||
worldrenderer
|
|
||||||
.pos((double) (f24 + (float) j1 + 0.0F), (double) (f3 + 4.0F),
|
|
||||||
(double) (f25 + 8.0F))
|
|
||||||
.tex((double) ((f22 + (float) j1 + 0.5F) * 0.00390625F + f17),
|
|
||||||
(double) ((f23 + 8.0F) * 0.00390625F + f18))
|
|
||||||
.color(f26, f27, f28, 0.8F).normal(-1.0F, 0.0F, 0.0F).endVertex();
|
|
||||||
worldrenderer
|
|
||||||
.pos((double) (f24 + (float) j1 + 0.0F), (double) (f3 + 4.0F),
|
|
||||||
(double) (f25 + 0.0F))
|
|
||||||
.tex((double) ((f22 + (float) j1 + 0.5F) * 0.00390625F + f17),
|
|
||||||
(double) ((f23 + 0.0F) * 0.00390625F + f18))
|
|
||||||
.color(f26, f27, f28, 0.8F).normal(-1.0F, 0.0F, 0.0F).endVertex();
|
|
||||||
worldrenderer
|
|
||||||
.pos((double) (f24 + (float) j1 + 0.0F), (double) (f3 + 0.0F),
|
|
||||||
(double) (f25 + 0.0F))
|
|
||||||
.tex((double) ((f22 + (float) j1 + 0.5F) * 0.00390625F + f17),
|
|
||||||
(double) ((f23 + 0.0F) * 0.00390625F + f18))
|
|
||||||
.color(f26, f27, f28, 0.8F).normal(-1.0F, 0.0F, 0.0F).endVertex();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (l <= 1) {
|
this.cloudRenderer.renderGlList();
|
||||||
for (int k1 = 0; k1 < 8; ++k1) {
|
}
|
||||||
worldrenderer
|
|
||||||
.pos((double) (f24 + (float) k1 + 1.0F - 9.765625E-4F), (double) (f3 + 0.0F),
|
|
||||||
(double) (f25 + 8.0F))
|
|
||||||
.tex((double) ((f22 + (float) k1 + 0.5F) * 0.00390625F + f17),
|
|
||||||
(double) ((f23 + 8.0F) * 0.00390625F + f18))
|
|
||||||
.color(f26, f27, f28, 0.8F).normal(1.0F, 0.0F, 0.0F).endVertex();
|
|
||||||
worldrenderer
|
|
||||||
.pos((double) (f24 + (float) k1 + 1.0F - 9.765625E-4F), (double) (f3 + 4.0F),
|
|
||||||
(double) (f25 + 8.0F))
|
|
||||||
.tex((double) ((f22 + (float) k1 + 0.5F) * 0.00390625F + f17),
|
|
||||||
(double) ((f23 + 8.0F) * 0.00390625F + f18))
|
|
||||||
.color(f26, f27, f28, 0.8F).normal(1.0F, 0.0F, 0.0F).endVertex();
|
|
||||||
worldrenderer
|
|
||||||
.pos((double) (f24 + (float) k1 + 1.0F - 9.765625E-4F), (double) (f3 + 4.0F),
|
|
||||||
(double) (f25 + 0.0F))
|
|
||||||
.tex((double) ((f22 + (float) k1 + 0.5F) * 0.00390625F + f17),
|
|
||||||
(double) ((f23 + 0.0F) * 0.00390625F + f18))
|
|
||||||
.color(f26, f27, f28, 0.8F).normal(1.0F, 0.0F, 0.0F).endVertex();
|
|
||||||
worldrenderer
|
|
||||||
.pos((double) (f24 + (float) k1 + 1.0F - 9.765625E-4F), (double) (f3 + 0.0F),
|
|
||||||
(double) (f25 + 0.0F))
|
|
||||||
.tex((double) ((f22 + (float) k1 + 0.5F) * 0.00390625F + f17),
|
|
||||||
(double) ((f23 + 0.0F) * 0.00390625F + f18))
|
|
||||||
.color(f26, f27, f28, 0.8F).normal(1.0F, 0.0F, 0.0F).endVertex();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (i1 > -1) {
|
if (this.cloudRenderer.shouldUpdateGlList()) {
|
||||||
for (int l1 = 0; l1 < 8; ++l1) {
|
this.cloudRenderer.startUpdateGlList();
|
||||||
worldrenderer
|
|
||||||
.pos((double) (f24 + 0.0F), (double) (f3 + 4.0F),
|
|
||||||
(double) (f25 + (float) l1 + 0.0F))
|
|
||||||
.tex((double) ((f22 + 0.0F) * 0.00390625F + f17),
|
|
||||||
(double) ((f23 + (float) l1 + 0.5F) * 0.00390625F + f18))
|
|
||||||
.color(f13, f14, f15, 0.8F).normal(0.0F, 0.0F, -1.0F).endVertex();
|
|
||||||
worldrenderer
|
|
||||||
.pos((double) (f24 + 8.0F), (double) (f3 + 4.0F),
|
|
||||||
(double) (f25 + (float) l1 + 0.0F))
|
|
||||||
.tex((double) ((f22 + 8.0F) * 0.00390625F + f17),
|
|
||||||
(double) ((f23 + (float) l1 + 0.5F) * 0.00390625F + f18))
|
|
||||||
.color(f13, f14, f15, 0.8F).normal(0.0F, 0.0F, -1.0F).endVertex();
|
|
||||||
worldrenderer
|
|
||||||
.pos((double) (f24 + 8.0F), (double) (f3 + 0.0F),
|
|
||||||
(double) (f25 + (float) l1 + 0.0F))
|
|
||||||
.tex((double) ((f22 + 8.0F) * 0.00390625F + f17),
|
|
||||||
(double) ((f23 + (float) l1 + 0.5F) * 0.00390625F + f18))
|
|
||||||
.color(f13, f14, f15, 0.8F).normal(0.0F, 0.0F, -1.0F).endVertex();
|
|
||||||
worldrenderer
|
|
||||||
.pos((double) (f24 + 0.0F), (double) (f3 + 0.0F),
|
|
||||||
(double) (f25 + (float) l1 + 0.0F))
|
|
||||||
.tex((double) ((f22 + 0.0F) * 0.00390625F + f17),
|
|
||||||
(double) ((f23 + (float) l1 + 0.5F) * 0.00390625F + f18))
|
|
||||||
.color(f13, f14, f15, 0.8F).normal(0.0F, 0.0F, -1.0F).endVertex();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (i1 <= 1) {
|
for (int j1 = -3; j1 <= 4; ++j1) {
|
||||||
for (int i2 = 0; i2 < 8; ++i2) {
|
for (int l = -3; l <= 4; ++l) {
|
||||||
worldrenderer
|
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR_NORMAL);
|
||||||
.pos((double) (f24 + 0.0F), (double) (f3 + 4.0F),
|
float f22 = (float)(j1 * 8);
|
||||||
(double) (f25 + (float) i2 + 1.0F - 9.765625E-4F))
|
float f23 = (float)(l * 8);
|
||||||
.tex((double) ((f22 + 0.0F) * 0.00390625F + f17),
|
float f24 = f22 - f19;
|
||||||
(double) ((f23 + (float) i2 + 0.5F) * 0.00390625F + f18))
|
float f25 = f23 - f20;
|
||||||
.color(f13, f14, f15, 0.8F).normal(0.0F, 0.0F, 1.0F).endVertex();
|
|
||||||
worldrenderer
|
|
||||||
.pos((double) (f24 + 8.0F), (double) (f3 + 4.0F),
|
|
||||||
(double) (f25 + (float) i2 + 1.0F - 9.765625E-4F))
|
|
||||||
.tex((double) ((f22 + 8.0F) * 0.00390625F + f17),
|
|
||||||
(double) ((f23 + (float) i2 + 0.5F) * 0.00390625F + f18))
|
|
||||||
.color(f13, f14, f15, 0.8F).normal(0.0F, 0.0F, 1.0F).endVertex();
|
|
||||||
worldrenderer
|
|
||||||
.pos((double) (f24 + 8.0F), (double) (f3 + 0.0F),
|
|
||||||
(double) (f25 + (float) i2 + 1.0F - 9.765625E-4F))
|
|
||||||
.tex((double) ((f22 + 8.0F) * 0.00390625F + f17),
|
|
||||||
(double) ((f23 + (float) i2 + 0.5F) * 0.00390625F + f18))
|
|
||||||
.color(f13, f14, f15, 0.8F).normal(0.0F, 0.0F, 1.0F).endVertex();
|
|
||||||
worldrenderer
|
|
||||||
.pos((double) (f24 + 0.0F), (double) (f3 + 0.0F),
|
|
||||||
(double) (f25 + (float) i2 + 1.0F - 9.765625E-4F))
|
|
||||||
.tex((double) ((f22 + 0.0F) * 0.00390625F + f17),
|
|
||||||
(double) ((f23 + (float) i2 + 0.5F) * 0.00390625F + f18))
|
|
||||||
.color(f13, f14, f15, 0.8F).normal(0.0F, 0.0F, 1.0F).endVertex();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tessellator.draw();
|
if (f3 > -5.0F) {
|
||||||
}
|
worldrenderer.pos((double)(f24 + 0.0F), (double)(f3 + 0.0F), (double)(f25 + 8.0F)).tex((double)((f22 + 0.0F) * 0.00390625F + f17), (double)((f23 + 8.0F) * 0.00390625F + f18)).color(f10, f11, f12, 0.8F).normal(0.0F, -1.0F, 0.0F).endVertex();
|
||||||
}
|
worldrenderer.pos((double)(f24 + 8.0F), (double)(f3 + 0.0F), (double)(f25 + 8.0F)).tex((double)((f22 + 8.0F) * 0.00390625F + f17), (double)((f23 + 8.0F) * 0.00390625F + f18)).color(f10, f11, f12, 0.8F).normal(0.0F, -1.0F, 0.0F).endVertex();
|
||||||
}
|
worldrenderer.pos((double)(f24 + 8.0F), (double)(f3 + 0.0F), (double)(f25 + 0.0F)).tex((double)((f22 + 8.0F) * 0.00390625F + f17), (double)((f23 + 0.0F) * 0.00390625F + f18)).color(f10, f11, f12, 0.8F).normal(0.0F, -1.0F, 0.0F).endVertex();
|
||||||
|
worldrenderer.pos((double)(f24 + 0.0F), (double)(f3 + 0.0F), (double)(f25 + 0.0F)).tex((double)((f22 + 0.0F) * 0.00390625F + f17), (double)((f23 + 0.0F) * 0.00390625F + f18)).color(f10, f11, f12, 0.8F).normal(0.0F, -1.0F, 0.0F).endVertex();
|
||||||
|
}
|
||||||
|
|
||||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
if (f3 <= 5.0F) {
|
||||||
GlStateManager.disableBlend();
|
worldrenderer.pos((double)(f24 + 0.0F), (double)(f3 + 4.0F - 9.765625E-4F), (double)(f25 + 8.0F)).tex((double)((f22 + 0.0F) * 0.00390625F + f17), (double)((f23 + 8.0F) * 0.00390625F + f18)).color(f4, f5, f6, 0.8F).normal(0.0F, 1.0F, 0.0F).endVertex();
|
||||||
GlStateManager.enableCull();
|
worldrenderer.pos((double)(f24 + 8.0F), (double)(f3 + 4.0F - 9.765625E-4F), (double)(f25 + 8.0F)).tex((double)((f22 + 8.0F) * 0.00390625F + f17), (double)((f23 + 8.0F) * 0.00390625F + f18)).color(f4, f5, f6, 0.8F).normal(0.0F, 1.0F, 0.0F).endVertex();
|
||||||
|
worldrenderer.pos((double)(f24 + 8.0F), (double)(f3 + 4.0F - 9.765625E-4F), (double)(f25 + 0.0F)).tex((double)((f22 + 8.0F) * 0.00390625F + f17), (double)((f23 + 0.0F) * 0.00390625F + f18)).color(f4, f5, f6, 0.8F).normal(0.0F, 1.0F, 0.0F).endVertex();
|
||||||
|
worldrenderer.pos((double)(f24 + 0.0F), (double)(f3 + 4.0F - 9.765625E-4F), (double)(f25 + 0.0F)).tex((double)((f22 + 0.0F) * 0.00390625F + f17), (double)((f23 + 0.0F) * 0.00390625F + f18)).color(f4, f5, f6, 0.8F).normal(0.0F, 1.0F, 0.0F).endVertex();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (j1 > -1) {
|
||||||
|
for (int i1 = 0; i1 < 8; ++i1) {
|
||||||
|
worldrenderer.pos((double)(f24 + (float)i1 + 0.0F), (double)(f3 + 0.0F), (double)(f25 + 8.0F)).tex((double)((f22 + (float)i1 + 0.5F) * 0.00390625F + f17), (double)((f23 + 8.0F) * 0.00390625F + f18)).color(f26, f27, f28, 0.8F).normal(-1.0F, 0.0F, 0.0F).endVertex();
|
||||||
|
worldrenderer.pos((double)(f24 + (float)i1 + 0.0F), (double)(f3 + 4.0F), (double)(f25 + 8.0F)).tex((double)((f22 + (float)i1 + 0.5F) * 0.00390625F + f17), (double)((f23 + 8.0F) * 0.00390625F + f18)).color(f26, f27, f28, 0.8F).normal(-1.0F, 0.0F, 0.0F).endVertex();
|
||||||
|
worldrenderer.pos((double)(f24 + (float)i1 + 0.0F), (double)(f3 + 4.0F), (double)(f25 + 0.0F)).tex((double)((f22 + (float)i1 + 0.5F) * 0.00390625F + f17), (double)((f23 + 0.0F) * 0.00390625F + f18)).color(f26, f27, f28, 0.8F).normal(-1.0F, 0.0F, 0.0F).endVertex();
|
||||||
|
worldrenderer.pos((double)(f24 + (float)i1 + 0.0F), (double)(f3 + 0.0F), (double)(f25 + 0.0F)).tex((double)((f22 + (float)i1 + 0.5F) * 0.00390625F + f17), (double)((f23 + 0.0F) * 0.00390625F + f18)).color(f26, f27, f28, 0.8F).normal(-1.0F, 0.0F, 0.0F).endVertex();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (j1 <= 1) {
|
||||||
|
for (int k1 = 0; k1 < 8; ++k1) {
|
||||||
|
worldrenderer.pos((double)(f24 + (float)k1 + 1.0F - 9.765625E-4F), (double)(f3 + 0.0F), (double)(f25 + 8.0F)).tex((double)((f22 + (float)k1 + 0.5F) * 0.00390625F + f17), (double)((f23 + 8.0F) * 0.00390625F + f18)).color(f26, f27, f28, 0.8F).normal(1.0F, 0.0F, 0.0F).endVertex();
|
||||||
|
worldrenderer.pos((double)(f24 + (float)k1 + 1.0F - 9.765625E-4F), (double)(f3 + 4.0F), (double)(f25 + 8.0F)).tex((double)((f22 + (float)k1 + 0.5F) * 0.00390625F + f17), (double)((f23 + 8.0F) * 0.00390625F + f18)).color(f26, f27, f28, 0.8F).normal(1.0F, 0.0F, 0.0F).endVertex();
|
||||||
|
worldrenderer.pos((double)(f24 + (float)k1 + 1.0F - 9.765625E-4F), (double)(f3 + 4.0F), (double)(f25 + 0.0F)).tex((double)((f22 + (float)k1 + 0.5F) * 0.00390625F + f17), (double)((f23 + 0.0F) * 0.00390625F + f18)).color(f26, f27, f28, 0.8F).normal(1.0F, 0.0F, 0.0F).endVertex();
|
||||||
|
worldrenderer.pos((double)(f24 + (float)k1 + 1.0F - 9.765625E-4F), (double)(f3 + 0.0F), (double)(f25 + 0.0F)).tex((double)((f22 + (float)k1 + 0.5F) * 0.00390625F + f17), (double)((f23 + 0.0F) * 0.00390625F + f18)).color(f26, f27, f28, 0.8F).normal(1.0F, 0.0F, 0.0F).endVertex();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (l > -1) {
|
||||||
|
for (int l1 = 0; l1 < 8; ++l1) {
|
||||||
|
worldrenderer.pos((double)(f24 + 0.0F), (double)(f3 + 4.0F), (double)(f25 + (float)l1 + 0.0F)).tex((double)((f22 + 0.0F) * 0.00390625F + f17), (double)((f23 + (float)l1 + 0.5F) * 0.00390625F + f18)).color(f13, f14, f15, 0.8F).normal(0.0F, 0.0F, -1.0F).endVertex();
|
||||||
|
worldrenderer.pos((double)(f24 + 8.0F), (double)(f3 + 4.0F), (double)(f25 + (float)l1 + 0.0F)).tex((double)((f22 + 8.0F) * 0.00390625F + f17), (double)((f23 + (float)l1 + 0.5F) * 0.00390625F + f18)).color(f13, f14, f15, 0.8F).normal(0.0F, 0.0F, -1.0F).endVertex();
|
||||||
|
worldrenderer.pos((double)(f24 + 8.0F), (double)(f3 + 0.0F), (double)(f25 + (float)l1 + 0.0F)).tex((double)((f22 + 8.0F) * 0.00390625F + f17), (double)((f23 + (float)l1 + 0.5F) * 0.00390625F + f18)).color(f13, f14, f15, 0.8F).normal(0.0F, 0.0F, -1.0F).endVertex();
|
||||||
|
worldrenderer.pos((double)(f24 + 0.0F), (double)(f3 + 0.0F), (double)(f25 + (float)l1 + 0.0F)).tex((double)((f22 + 0.0F) * 0.00390625F + f17), (double)((f23 + (float)l1 + 0.5F) * 0.00390625F + f18)).color(f13, f14, f15, 0.8F).normal(0.0F, 0.0F, -1.0F).endVertex();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (l <= 1) {
|
||||||
|
for (int i2 = 0; i2 < 8; ++i2) {
|
||||||
|
worldrenderer.pos((double)(f24 + 0.0F), (double)(f3 + 4.0F), (double)(f25 + (float)i2 + 1.0F - 9.765625E-4F)).tex((double)((f22 + 0.0F) * 0.00390625F + f17), (double)((f23 + (float)i2 + 0.5F) * 0.00390625F + f18)).color(f13, f14, f15, 0.8F).normal(0.0F, 0.0F, 1.0F).endVertex();
|
||||||
|
worldrenderer.pos((double)(f24 + 8.0F), (double)(f3 + 4.0F), (double)(f25 + (float)i2 + 1.0F - 9.765625E-4F)).tex((double)((f22 + 8.0F) * 0.00390625F + f17), (double)((f23 + (float)i2 + 0.5F) * 0.00390625F + f18)).color(f13, f14, f15, 0.8F).normal(0.0F, 0.0F, 1.0F).endVertex();
|
||||||
|
worldrenderer.pos((double)(f24 + 8.0F), (double)(f3 + 0.0F), (double)(f25 + (float)i2 + 1.0F - 9.765625E-4F)).tex((double)((f22 + 8.0F) * 0.00390625F + f17), (double)((f23 + (float)i2 + 0.5F) * 0.00390625F + f18)).color(f13, f14, f15, 0.8F).normal(0.0F, 0.0F, 1.0F).endVertex();
|
||||||
|
worldrenderer.pos((double)(f24 + 0.0F), (double)(f3 + 0.0F), (double)(f25 + (float)i2 + 1.0F - 9.765625E-4F)).tex((double)((f22 + 0.0F) * 0.00390625F + f17), (double)((f23 + (float)i2 + 0.5F) * 0.00390625F + f18)).color(f13, f14, f15, 0.8F).normal(0.0F, 0.0F, 1.0F).endVertex();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tessellator.draw();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.cloudRenderer.endUpdateGlList();
|
||||||
|
}
|
||||||
|
|
||||||
|
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
|
GlStateManager.disableBlend();
|
||||||
|
GlStateManager.enableCull();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateChunks(long finishTimeNano) {
|
public void updateChunks(long finishTimeNano) {
|
||||||
|
@ -2599,6 +2497,10 @@ public class RenderGlobal implements IWorldAccess, IResourceManagerReloadListene
|
||||||
this.field_181024_n.addAll(parCollection2);
|
this.field_181024_n.addAll(parCollection2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void resetClouds() {
|
||||||
|
this.cloudRenderer.reset();
|
||||||
|
}
|
||||||
|
|
||||||
class ContainerLocalRenderInformation {
|
class ContainerLocalRenderInformation {
|
||||||
final RenderChunk renderChunk;
|
final RenderChunk renderChunk;
|
||||||
|
|
|
@ -82,10 +82,6 @@ public class GameSettings {
|
||||||
public boolean anaglyph;
|
public boolean anaglyph;
|
||||||
public boolean fboEnable = true;
|
public boolean fboEnable = true;
|
||||||
public int limitFramerate = 260;
|
public int limitFramerate = 260;
|
||||||
/**+
|
|
||||||
* Clouds flag
|
|
||||||
*/
|
|
||||||
public int clouds = 1;
|
|
||||||
public boolean fancyGraphics = false;
|
public boolean fancyGraphics = false;
|
||||||
/**+
|
/**+
|
||||||
* Smooth Lighting
|
* Smooth Lighting
|
||||||
|
@ -200,6 +196,12 @@ public class GameSettings {
|
||||||
public boolean ofClearWater = false;
|
public boolean ofClearWater = false;
|
||||||
public int ofBetterGrass = 3;
|
public int ofBetterGrass = 3;
|
||||||
|
|
||||||
|
//Detail Settings
|
||||||
|
/** Clouds flag */
|
||||||
|
public int clouds = 2;
|
||||||
|
public int ofClouds = 0;
|
||||||
|
public float ofCloudsHeight = 0.0F;
|
||||||
|
|
||||||
//Optifine Animations
|
//Optifine Animations
|
||||||
public int ofAnimatedWater = 0;
|
public int ofAnimatedWater = 0;
|
||||||
public int ofAnimatedLava = 0;
|
public int ofAnimatedLava = 0;
|
||||||
|
@ -347,6 +349,11 @@ public class GameSettings {
|
||||||
this.ofAoLevel = parFloat1;
|
this.ofAoLevel = parFloat1;
|
||||||
this.mc.renderGlobal.loadRenderers();
|
this.mc.renderGlobal.loadRenderers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (parOptions == GameSettings.Options.CLOUD_HEIGHT) {
|
||||||
|
this.ofCloudsHeight = parFloat1;
|
||||||
|
this.mc.renderGlobal.resetClouds();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**+
|
/**+
|
||||||
|
@ -370,10 +377,6 @@ public class GameSettings {
|
||||||
this.viewBobbing = !this.viewBobbing;
|
this.viewBobbing = !this.viewBobbing;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parOptions == GameSettings.Options.RENDER_CLOUDS) {
|
|
||||||
this.clouds = (this.clouds + parInt1) % 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (parOptions == GameSettings.Options.FORCE_UNICODE_FONT) {
|
if (parOptions == GameSettings.Options.FORCE_UNICODE_FONT) {
|
||||||
this.forceUnicodeFont = !this.forceUnicodeFont;
|
this.forceUnicodeFont = !this.forceUnicodeFont;
|
||||||
this.mc.fontRendererObj
|
this.mc.fontRendererObj
|
||||||
|
@ -635,6 +638,17 @@ public class GameSettings {
|
||||||
this.ofChunkUpdates = 1;
|
this.ofChunkUpdates = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (parOptions == GameSettings.Options.CLOUDS) {
|
||||||
|
++this.ofClouds;
|
||||||
|
|
||||||
|
if (this.ofClouds > 3) {
|
||||||
|
this.ofClouds = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.updateRenderClouds();
|
||||||
|
this.mc.renderGlobal.resetClouds();
|
||||||
|
}
|
||||||
|
|
||||||
this.saveOptions();
|
this.saveOptions();
|
||||||
}
|
}
|
||||||
|
@ -653,7 +667,8 @@ public class GameSettings {
|
||||||
: (parOptions == GameSettings.Options.MIPMAP_LEVELS ? (float) this.mipmapLevels
|
: (parOptions == GameSettings.Options.MIPMAP_LEVELS ? (float) this.mipmapLevels
|
||||||
: (parOptions == GameSettings.Options.RENDER_DISTANCE ? (float) this.renderDistanceChunks
|
: (parOptions == GameSettings.Options.RENDER_DISTANCE ? (float) this.renderDistanceChunks
|
||||||
: (parOptions == GameSettings.Options.AO_LEVEL ? this.ofAoLevel
|
: (parOptions == GameSettings.Options.AO_LEVEL ? this.ofAoLevel
|
||||||
: 0.0F))))))))))));
|
: (parOptions == GameSettings.Options.CLOUD_HEIGHT ? this.ofCloudsHeight
|
||||||
|
: 0.0F)))))))))))));
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean getOptionOrdinalValue(GameSettings.Options parOptions) {
|
public boolean getOptionOrdinalValue(GameSettings.Options parOptions) {
|
||||||
|
@ -738,7 +753,6 @@ public class GameSettings {
|
||||||
return parOptions == GameSettings.Options.SENSITIVITY ? (f == 0.0F ? s + I18n.format("options.sensitivity.min", new Object[0]) : (f == 1.0F ? s + I18n.format("options.sensitivity.max", new Object[0]) : s + (int) (f * 200.0F) + "%"))
|
return parOptions == GameSettings.Options.SENSITIVITY ? (f == 0.0F ? s + I18n.format("options.sensitivity.min", new Object[0]) : (f == 1.0F ? s + I18n.format("options.sensitivity.max", new Object[0]) : s + (int) (f * 200.0F) + "%"))
|
||||||
: (parOptions == GameSettings.Options.FOV ? (f1 == 70.0F ? s + I18n.format("options.fov.min", new Object[0]) : (f1 == 110.0F ? s + I18n.format("options.fov.max", new Object[0]) : s + (int) f1))
|
: (parOptions == GameSettings.Options.FOV ? (f1 == 70.0F ? s + I18n.format("options.fov.min", new Object[0]) : (f1 == 110.0F ? s + I18n.format("options.fov.max", new Object[0]) : s + (int) f1))
|
||||||
: (parOptions == GameSettings.Options.FRAMERATE_LIMIT ? (f1 == parOptions.valueMax ? s + I18n.format("options.framerateLimit.max", new Object[0]) : s + (int) f1 + " fps")
|
: (parOptions == GameSettings.Options.FRAMERATE_LIMIT ? (f1 == parOptions.valueMax ? s + I18n.format("options.framerateLimit.max", new Object[0]) : s + (int) f1 + " fps")
|
||||||
: (parOptions == GameSettings.Options.RENDER_CLOUDS ? (f1 == parOptions.valueMin ? s + I18n.format("options.cloudHeight.min", new Object[0]) : s + ((int) f1 + 128))
|
|
||||||
: (parOptions == GameSettings.Options.GAMMA ? (f == 0.0F ? s + I18n.format("options.gamma.min", new Object[0]) : (f == 1.0F ? s + I18n.format("options.gamma.max", new Object[0]) : s + "+" + (int) (f * 100.0F) + "%"))
|
: (parOptions == GameSettings.Options.GAMMA ? (f == 0.0F ? s + I18n.format("options.gamma.min", new Object[0]) : (f == 1.0F ? s + I18n.format("options.gamma.max", new Object[0]) : s + "+" + (int) (f * 100.0F) + "%"))
|
||||||
: (parOptions == GameSettings.Options.SATURATION ? s + (int) (f * 400.0F) + "%"
|
: (parOptions == GameSettings.Options.SATURATION ? s + (int) (f * 400.0F) + "%"
|
||||||
: (parOptions == GameSettings.Options.CHAT_OPACITY ? s + (int) (f * 90.0F + 10.0F) + "%"
|
: (parOptions == GameSettings.Options.CHAT_OPACITY ? s + (int) (f * 90.0F + 10.0F) + "%"
|
||||||
|
@ -749,6 +763,7 @@ public class GameSettings {
|
||||||
: (parOptions == GameSettings.Options.RENDER_DISTANCE ? s + (int) f1 + (f1 == 1.0F ? " chunk" : " chunks")
|
: (parOptions == GameSettings.Options.RENDER_DISTANCE ? s + (int) f1 + (f1 == 1.0F ? " chunk" : " chunks")
|
||||||
: (parOptions == GameSettings.Options.MIPMAP_LEVELS ? (f == 0.0F ? s + I18n.format("options.off", new Object[0]) : s + (int) (f * 100.0F) + "%")
|
: (parOptions == GameSettings.Options.MIPMAP_LEVELS ? (f == 0.0F ? s + I18n.format("options.off", new Object[0]) : s + (int) (f * 100.0F) + "%")
|
||||||
: (parOptions == GameSettings.Options.AO_LEVEL ? (f == 0.0F ? s + I18n.format("options.off", new Object[0]) : s + (int) (f * 100.0F) + "%")
|
: (parOptions == GameSettings.Options.AO_LEVEL ? (f == 0.0F ? s + I18n.format("options.off", new Object[0]) : s + (int) (f * 100.0F) + "%")
|
||||||
|
: (parOptions == GameSettings.Options.CLOUD_HEIGHT ? (f == 0.0F ? s + I18n.format("options.off", new Object[0]) : s + (int) (f * 100.0F) + "%")
|
||||||
: "yee")))))))))))));
|
: "yee")))))))))))));
|
||||||
} else if (parOptions.getEnumBoolean()) {
|
} else if (parOptions.getEnumBoolean()) {
|
||||||
boolean flag = this.getOptionOrdinalValue(parOptions);
|
boolean flag = this.getOptionOrdinalValue(parOptions);
|
||||||
|
@ -761,8 +776,6 @@ public class GameSettings {
|
||||||
return s + getTranslation(PARTICLES, this.particleSetting);
|
return s + getTranslation(PARTICLES, this.particleSetting);
|
||||||
} else if (parOptions == GameSettings.Options.AMBIENT_OCCLUSION) {
|
} else if (parOptions == GameSettings.Options.AMBIENT_OCCLUSION) {
|
||||||
return s + getTranslation(AMBIENT_OCCLUSIONS, this.ambientOcclusion);
|
return s + getTranslation(AMBIENT_OCCLUSIONS, this.ambientOcclusion);
|
||||||
} else if (parOptions == GameSettings.Options.RENDER_CLOUDS) {
|
|
||||||
return s + getTranslation(field_181149_aW, this.clouds);
|
|
||||||
} else if (parOptions == GameSettings.Options.GRAPHICS) {
|
} else if (parOptions == GameSettings.Options.GRAPHICS) {
|
||||||
if (this.fancyGraphics) {
|
if (this.fancyGraphics) {
|
||||||
return s + I18n.format("options.graphics.fancy", new Object[0]);
|
return s + I18n.format("options.graphics.fancy", new Object[0]);
|
||||||
|
@ -883,6 +896,20 @@ public class GameSettings {
|
||||||
return this.ofSmoothFps ? s + "ON" : s + "OFF";
|
return this.ofSmoothFps ? s + "ON" : s + "OFF";
|
||||||
} else if (parOptions == GameSettings.Options.CHUNK_UPDATES) {
|
} else if (parOptions == GameSettings.Options.CHUNK_UPDATES) {
|
||||||
return s + this.ofChunkUpdates;
|
return s + this.ofChunkUpdates;
|
||||||
|
} else if (parOptions == GameSettings.Options.CLOUDS) {
|
||||||
|
switch (this.ofClouds) {
|
||||||
|
case 1:
|
||||||
|
return s + "Fast";
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
return s + "Fancy";
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
return s + "OFF";
|
||||||
|
|
||||||
|
default:
|
||||||
|
return s + "Default";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
@ -973,16 +1000,6 @@ public class GameSettings {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (astring[0].equals("renderClouds")) {
|
|
||||||
if (astring[1].equals("true")) {
|
|
||||||
this.clouds = 2;
|
|
||||||
} else if (astring[1].equals("false")) {
|
|
||||||
this.clouds = 0;
|
|
||||||
} else if (astring[1].equals("fast")) {
|
|
||||||
this.clouds = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (astring[0].equals("resourcePacks")) {
|
if (astring[0].equals("resourcePacks")) {
|
||||||
this.resourcePacks.clear();
|
this.resourcePacks.clear();
|
||||||
for (Object o : (new JSONArray(s.substring(s.indexOf(58) + 1))).toList()) {
|
for (Object o : (new JSONArray(s.substring(s.indexOf(58) + 1))).toList()) {
|
||||||
|
@ -1294,6 +1311,17 @@ public class GameSettings {
|
||||||
this.ofChunkUpdates = Integer.valueOf(astring[1]).intValue();
|
this.ofChunkUpdates = Integer.valueOf(astring[1]).intValue();
|
||||||
this.ofChunkUpdates = Config.limit(this.ofChunkUpdates, 1, 5);
|
this.ofChunkUpdates = Config.limit(this.ofChunkUpdates, 1, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (astring[0].equals("ofClouds") && astring.length >= 2) {
|
||||||
|
this.ofClouds = Integer.valueOf(astring[1]).intValue();
|
||||||
|
this.ofClouds = Config.limit(this.ofClouds, 0, 3);
|
||||||
|
this.updateRenderClouds();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (astring[0].equals("ofCloudsHeight") && astring.length >= 2) {
|
||||||
|
this.ofCloudsHeight = Float.valueOf(astring[1]).floatValue();
|
||||||
|
this.ofCloudsHeight = Config.limit(this.ofCloudsHeight, 0.0F, 1.0F);
|
||||||
|
}
|
||||||
|
|
||||||
Keyboard.setFunctionKeyModifier(keyBindFunction.getKeyCode());
|
Keyboard.setFunctionKeyModifier(keyBindFunction.getKeyCode());
|
||||||
|
|
||||||
|
@ -1351,17 +1379,6 @@ public class GameSettings {
|
||||||
printwriter.println("difficulty:" + this.difficulty.getDifficultyId());
|
printwriter.println("difficulty:" + this.difficulty.getDifficultyId());
|
||||||
printwriter.println("fancyGraphics:" + this.fancyGraphics);
|
printwriter.println("fancyGraphics:" + this.fancyGraphics);
|
||||||
printwriter.println("ao:" + this.ambientOcclusion);
|
printwriter.println("ao:" + this.ambientOcclusion);
|
||||||
switch (this.clouds) {
|
|
||||||
case 0:
|
|
||||||
printwriter.println("renderClouds:false");
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
printwriter.println("renderClouds:fast");
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
printwriter.println("renderClouds:true");
|
|
||||||
}
|
|
||||||
|
|
||||||
printwriter.println("resourcePacks:" + toJSONArray(this.resourcePacks));
|
printwriter.println("resourcePacks:" + toJSONArray(this.resourcePacks));
|
||||||
printwriter.println("incompatibleResourcePacks:" + toJSONArray(this.field_183018_l));
|
printwriter.println("incompatibleResourcePacks:" + toJSONArray(this.field_183018_l));
|
||||||
printwriter.println("lastServer:" + this.lastServer);
|
printwriter.println("lastServer:" + this.lastServer);
|
||||||
|
@ -1440,6 +1457,8 @@ public class GameSettings {
|
||||||
}
|
}
|
||||||
printwriter.println("ofSmoothFps:" + this.ofSmoothFps);
|
printwriter.println("ofSmoothFps:" + this.ofSmoothFps);
|
||||||
printwriter.println("ofChunkUpdates:" + this.ofChunkUpdates);
|
printwriter.println("ofChunkUpdates:" + this.ofChunkUpdates);
|
||||||
|
printwriter.println("ofClouds:" + this.ofClouds);
|
||||||
|
printwriter.println("ofCloudsHeight:" + this.ofCloudsHeight);
|
||||||
|
|
||||||
for (KeyBinding keybinding : this.keyBindings) {
|
for (KeyBinding keybinding : this.keyBindings) {
|
||||||
printwriter.println("key_" + keybinding.getKeyDescription() + ":" + keybinding.getKeyCode());
|
printwriter.println("key_" + keybinding.getKeyDescription() + ":" + keybinding.getKeyCode());
|
||||||
|
@ -1521,11 +1540,7 @@ public class GameSettings {
|
||||||
|
|
||||||
this.sendSettingsToServer();
|
this.sendSettingsToServer();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int func_181147_e() {
|
|
||||||
return this.renderDistanceChunks >= 4 ? this.clouds : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean func_181148_f() {
|
public boolean func_181148_f() {
|
||||||
return this.field_181150_U;
|
return this.field_181150_U;
|
||||||
}
|
}
|
||||||
|
@ -1548,8 +1563,7 @@ public class GameSettings {
|
||||||
VIEW_BOBBING("options.viewBobbing", false, true),
|
VIEW_BOBBING("options.viewBobbing", false, true),
|
||||||
ANAGLYPH("options.anaglyph", false, true),
|
ANAGLYPH("options.anaglyph", false, true),
|
||||||
FRAMERATE_LIMIT("options.framerateLimit", true, false, 10.0F, 260.0F, 10.0F),
|
FRAMERATE_LIMIT("options.framerateLimit", true, false, 10.0F, 260.0F, 10.0F),
|
||||||
FBO_ENABLE("options.fboEnable", false, true),
|
FBO_ENABLE("options.fboEnable", false, true),
|
||||||
RENDER_CLOUDS("options.renderClouds", false, false),
|
|
||||||
GRAPHICS("options.graphics", false, false),
|
GRAPHICS("options.graphics", false, false),
|
||||||
AMBIENT_OCCLUSION("options.ao", false, false),
|
AMBIENT_OCCLUSION("options.ao", false, false),
|
||||||
GUI_SCALE("options.guiScale", false, false),
|
GUI_SCALE("options.guiScale", false, false),
|
||||||
|
@ -1609,7 +1623,9 @@ public class GameSettings {
|
||||||
FOG_START("Fog Start", false, false),
|
FOG_START("Fog Start", false, false),
|
||||||
SHADER_PROFILE("Profile", false, false),
|
SHADER_PROFILE("Profile", false, false),
|
||||||
SMOOTH_FPS("Smooth FPS", false, false),
|
SMOOTH_FPS("Smooth FPS", false, false),
|
||||||
CHUNK_UPDATES("Chunk Updates", false, false);
|
CHUNK_UPDATES("Chunk Updates", false, false),
|
||||||
|
CLOUDS("Clouds", false, false),
|
||||||
|
CLOUD_HEIGHT("Cloud Height", true, false);
|
||||||
|
|
||||||
private final boolean enumFloat;
|
private final boolean enumFloat;
|
||||||
private final boolean enumBoolean;
|
private final boolean enumBoolean;
|
||||||
|
@ -1714,4 +1730,27 @@ public class GameSettings {
|
||||||
private void updateWaterOpacity() {
|
private void updateWaterOpacity() {
|
||||||
ClearWater.updateWaterOpacity(this, this.mc.theWorld);
|
ClearWater.updateWaterOpacity(this, this.mc.theWorld);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void updateRenderClouds() {
|
||||||
|
switch (this.ofClouds) {
|
||||||
|
case 1:
|
||||||
|
this.clouds = 1;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
this.clouds = 2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
this.clouds = 0;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
if (this.fancyGraphics) {
|
||||||
|
this.clouds = 2;
|
||||||
|
} else {
|
||||||
|
this.clouds = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user