Finish details tab
This commit is contained in:
parent
b52a05db8c
commit
202a6577f0
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
66962
javascript/classes.js
66962
javascript/classes.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -182,6 +182,26 @@ public class Config {
|
|||
public static boolean isStarsEnabled() {
|
||||
return Minecraft.getMinecraft().gameSettings.ofStars;
|
||||
}
|
||||
|
||||
public static boolean isShowCapes() {
|
||||
return Minecraft.getMinecraft().gameSettings.ofShowCapes;
|
||||
}
|
||||
|
||||
public static boolean isTranslucentBlocksFancy() {
|
||||
return Minecraft.getMinecraft().gameSettings.ofTranslucentBlocks == 0 ? Minecraft.getMinecraft().gameSettings.fancyGraphics : Minecraft.getMinecraft().gameSettings.ofTranslucentBlocks == 2;
|
||||
}
|
||||
|
||||
public static boolean isDroppedItemsFancy() {
|
||||
return Minecraft.getMinecraft().gameSettings.ofDroppedItems == 0 ? Minecraft.getMinecraft().gameSettings.fancyGraphics : Minecraft.getMinecraft().gameSettings.ofDroppedItems == 2;
|
||||
}
|
||||
|
||||
public static boolean isVignetteEnabled() {
|
||||
return Minecraft.getMinecraft().gameSettings.ofVignette == 0 ? Minecraft.getMinecraft().gameSettings.fancyGraphics : Minecraft.getMinecraft().gameSettings.ofVignette == 2;
|
||||
}
|
||||
|
||||
public static boolean isDynamicFov() {
|
||||
return Minecraft.getMinecraft().gameSettings.ofDynamicFov;
|
||||
}
|
||||
|
||||
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_);
|
||||
|
|
|
@ -12,8 +12,7 @@ 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, GameSettings.Options.TREES, GameSettings.Options.RAIN, GameSettings.Options.SKY, GameSettings.Options.STARS, GameSettings.Options.SUN_MOON};
|
||||
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};
|
||||
|
||||
public GuiDetails(GuiScreen p_i47_1_) {
|
||||
this.prevScreen = p_i47_1_;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package net.minecraft.client.entity;
|
||||
|
||||
import net.PeytonPlayz585.shadow.Config;
|
||||
import net.lax1dude.eaglercraft.v1_8.mojang.authlib.GameProfile;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.network.NetworkPlayerInfo;
|
||||
|
@ -14,6 +15,7 @@ import net.minecraft.world.WorldSettings;
|
|||
|
||||
public abstract class AbstractClientPlayer extends EntityPlayer {
|
||||
private NetworkPlayerInfo playerInfo;
|
||||
private ResourceLocation locationOfCape = null;
|
||||
|
||||
public AbstractClientPlayer(World worldIn, GameProfile playerProfile) {
|
||||
super(worldIn, playerProfile);
|
||||
|
@ -62,8 +64,14 @@ public abstract class AbstractClientPlayer extends EntityPlayer {
|
|||
}
|
||||
|
||||
public ResourceLocation getLocationCape() {
|
||||
NetworkPlayerInfo networkplayerinfo = this.getPlayerInfo();
|
||||
return networkplayerinfo == null ? null : networkplayerinfo.getLocationCape();
|
||||
if (!Config.isShowCapes()) {
|
||||
return null;
|
||||
} else if (this.locationOfCape != null) {
|
||||
return this.locationOfCape;
|
||||
} else {
|
||||
NetworkPlayerInfo networkplayerinfo = this.getPlayerInfo();
|
||||
return networkplayerinfo == null ? null : networkplayerinfo.getLocationCape();
|
||||
}
|
||||
}
|
||||
|
||||
public String getSkinType() {
|
||||
|
@ -99,4 +107,12 @@ public abstract class AbstractClientPlayer extends EntityPlayer {
|
|||
|
||||
return f;
|
||||
}
|
||||
|
||||
public ResourceLocation getLocationOfCape() {
|
||||
return this.locationOfCape;
|
||||
}
|
||||
|
||||
public void setLocationOfCape(ResourceLocation p_setLocationOfCape_1_) {
|
||||
this.locationOfCape = p_setLocationOfCape_1_;
|
||||
}
|
||||
}
|
|
@ -8,6 +8,7 @@ import java.util.List;
|
|||
|
||||
import net.FatalCodes.shadow.Shadow;
|
||||
import net.FatalCodes.shadow.module.RenderModule;
|
||||
import net.PeytonPlayz585.shadow.Config;
|
||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||
import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite;
|
||||
|
||||
|
@ -807,44 +808,46 @@ public class GuiIngame extends Gui {
|
|||
* light level.
|
||||
*/
|
||||
public void renderVignette(float parFloat1, int scaledWidth, int scaledHeight) {
|
||||
parFloat1 = 1.0F - parFloat1;
|
||||
parFloat1 = MathHelper.clamp_float(parFloat1, 0.0F, 1.0F);
|
||||
WorldBorder worldborder = this.mc.theWorld.getWorldBorder();
|
||||
float f = (float) worldborder.getClosestDistance(this.mc.thePlayer);
|
||||
double d0 = Math.min(worldborder.getResizeSpeed() * (double) worldborder.getWarningTime() * 1000.0D,
|
||||
Math.abs(worldborder.getTargetSize() - worldborder.getDiameter()));
|
||||
double d1 = Math.max((double) worldborder.getWarningDistance(), d0);
|
||||
if ((double) f < d1) {
|
||||
f = 1.0F - (float) ((double) f / d1);
|
||||
} else {
|
||||
f = 0.0F;
|
||||
}
|
||||
if (!Config.isVignetteEnabled()) {
|
||||
GlStateManager.enableDepth();
|
||||
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
|
||||
} else {
|
||||
parFloat1 = 1.0F - parFloat1;
|
||||
parFloat1 = MathHelper.clamp_float(parFloat1, 0.0F, 1.0F);
|
||||
WorldBorder worldborder = this.mc.theWorld.getWorldBorder();
|
||||
float f = (float) worldborder.getClosestDistance(this.mc.thePlayer);
|
||||
double d0 = Math.min(worldborder.getResizeSpeed() * (double) worldborder.getWarningTime() * 1000.0D, Math.abs(worldborder.getTargetSize() - worldborder.getDiameter()));
|
||||
double d1 = Math.max((double) worldborder.getWarningDistance(), d0);
|
||||
if ((double) f < d1) {
|
||||
f = 1.0F - (float) ((double) f / d1);
|
||||
} else {
|
||||
f = 0.0F;
|
||||
}
|
||||
|
||||
this.prevVignetteBrightness = (float) ((double) this.prevVignetteBrightness
|
||||
+ (double) (parFloat1 - this.prevVignetteBrightness) * 0.01D);
|
||||
GlStateManager.disableDepth();
|
||||
GlStateManager.depthMask(false);
|
||||
GlStateManager.tryBlendFuncSeparate(0, GL_ONE_MINUS_SRC_COLOR, 1, 0);
|
||||
if (f > 0.0F) {
|
||||
GlStateManager.color(0.0F, f, f, 1.0F);
|
||||
} else {
|
||||
GlStateManager.color(this.prevVignetteBrightness, this.prevVignetteBrightness, this.prevVignetteBrightness,
|
||||
1.0F);
|
||||
}
|
||||
this.prevVignetteBrightness = (float) ((double) this.prevVignetteBrightness + (double) (parFloat1 - this.prevVignetteBrightness) * 0.01D);
|
||||
GlStateManager.disableDepth();
|
||||
GlStateManager.depthMask(false);
|
||||
GlStateManager.tryBlendFuncSeparate(0, GL_ONE_MINUS_SRC_COLOR, 1, 0);
|
||||
if (f > 0.0F) {
|
||||
GlStateManager.color(0.0F, f, f, 1.0F);
|
||||
} else {
|
||||
GlStateManager.color(this.prevVignetteBrightness, this.prevVignetteBrightness, this.prevVignetteBrightness, 1.0F);
|
||||
}
|
||||
|
||||
this.mc.getTextureManager().bindTexture(vignetteTexPath);
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
||||
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX);
|
||||
worldrenderer.pos(0.0D, (double) scaledHeight, -90.0D).tex(0.0D, 1.0D).endVertex();
|
||||
worldrenderer.pos((double) scaledWidth, scaledHeight, -90.0D).tex(1.0D, 1.0D).endVertex();
|
||||
worldrenderer.pos((double) scaledWidth, 0.0D, -90.0D).tex(1.0D, 0.0D).endVertex();
|
||||
worldrenderer.pos(0.0D, 0.0D, -90.0D).tex(0.0D, 0.0D).endVertex();
|
||||
tessellator.draw();
|
||||
GlStateManager.depthMask(true);
|
||||
GlStateManager.enableDepth();
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.tryBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, 1, 0);
|
||||
this.mc.getTextureManager().bindTexture(vignetteTexPath);
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
||||
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX);
|
||||
worldrenderer.pos(0.0D, (double) scaledHeight, -90.0D).tex(0.0D, 1.0D).endVertex();
|
||||
worldrenderer.pos((double) scaledWidth, scaledHeight, -90.0D).tex(1.0D, 1.0D).endVertex();
|
||||
worldrenderer.pos((double) scaledWidth, 0.0D, -90.0D).tex(1.0D, 0.0D).endVertex();
|
||||
worldrenderer.pos(0.0D, 0.0D, -90.0D).tex(0.0D, 0.0D).endVertex();
|
||||
tessellator.draw();
|
||||
GlStateManager.depthMask(true);
|
||||
GlStateManager.enableDepth();
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.tryBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, 1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
private void func_180474_b(float parFloat1, ScaledResolution parScaledResolution) {
|
||||
|
|
|
@ -417,7 +417,10 @@ public class EntityRenderer implements IResourceManagerReloadListener {
|
|||
float f = 70.0F;
|
||||
if (parFlag) {
|
||||
f = this.mc.gameSettings.keyBindZoomCamera.isKeyDown() ? 17.0f : this.mc.gameSettings.fovSetting;
|
||||
f = f * (this.fovModifierHandPrev + (this.fovModifierHand - this.fovModifierHandPrev) * partialTicks);
|
||||
|
||||
if (Config.isDynamicFov()) {
|
||||
f *= this.fovModifierHandPrev + (this.fovModifierHand - this.fovModifierHandPrev) * partialTicks;
|
||||
}
|
||||
}
|
||||
|
||||
if (entity instanceof EntityLivingBase && ((EntityLivingBase) entity).getHealth() <= 0.0F) {
|
||||
|
@ -963,9 +966,14 @@ public class EntityRenderer implements IResourceManagerReloadListener {
|
|||
this.setupOverlayRendering();
|
||||
GlStateManager.disableLighting();
|
||||
GlStateManager.enableBlend();
|
||||
if (Minecraft.isFancyGraphicsEnabled()) {
|
||||
|
||||
if (Config.isVignetteEnabled()) {
|
||||
this.mc.ingameGUI.renderVignette(parFloat1, l, i1);
|
||||
}
|
||||
} else {
|
||||
GlStateManager.enableDepth();
|
||||
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
|
||||
}
|
||||
|
||||
this.mc.ingameGUI.renderGameOverlayCrosshairs(l, i1);
|
||||
GlStateManager.bindTexture(this.overlayFramebuffer.getTexture());
|
||||
GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
|
|
|
@ -554,6 +554,8 @@ public class RenderGlobal implements IWorldAccess, IResourceManagerReloadListene
|
|||
}
|
||||
|
||||
this.theWorld.theProfiler.endStartSection("entities");
|
||||
boolean flag4 = this.mc.gameSettings.fancyGraphics;
|
||||
this.mc.gameSettings.fancyGraphics = Config.isDroppedItemsFancy();
|
||||
|
||||
label738: for (RenderGlobal.ContainerLocalRenderInformation renderglobal$containerlocalrenderinformation : this.renderInfos) {
|
||||
Chunk chunk = this.theWorld.getChunkFromBlockCoords(
|
||||
|
@ -602,6 +604,7 @@ public class RenderGlobal implements IWorldAccess, IResourceManagerReloadListene
|
|||
}
|
||||
}
|
||||
|
||||
this.mc.gameSettings.fancyGraphics = flag4;
|
||||
this.theWorld.theProfiler.endStartSection("blockentities");
|
||||
RenderHelper.enableStandardItemLighting();
|
||||
|
||||
|
|
|
@ -109,7 +109,6 @@ public class GameSettings {
|
|||
public boolean touchscreen;
|
||||
public int overrideWidth;
|
||||
public int overrideHeight;
|
||||
public boolean heldItemTooltips = true;
|
||||
public float chatScale = 1.0F;
|
||||
public float chatWidth = 1.0F;
|
||||
public float chatHeightUnfocused = 0.44366196F;
|
||||
|
@ -207,6 +206,12 @@ public class GameSettings {
|
|||
public boolean ofSky = true;
|
||||
public boolean ofStars = true;
|
||||
public boolean ofSunMoon = true;
|
||||
public boolean ofShowCapes = true;
|
||||
public int ofTranslucentBlocks = 0;
|
||||
public boolean heldItemTooltips = true;
|
||||
public int ofDroppedItems = 0;
|
||||
public int ofVignette = 0;
|
||||
public boolean ofDynamicFov = true;
|
||||
|
||||
//Optifine Animations
|
||||
public int ofAnimatedWater = 0;
|
||||
|
@ -698,6 +703,48 @@ public class GameSettings {
|
|||
if (parOptions == GameSettings.Options.SUN_MOON) {
|
||||
this.ofSunMoon = !this.ofSunMoon;
|
||||
}
|
||||
|
||||
if (parOptions == GameSettings.Options.SHOW_CAPES) {
|
||||
this.ofShowCapes = !this.ofShowCapes;
|
||||
}
|
||||
|
||||
if (parOptions == GameSettings.Options.TRANSLUCENT_BLOCKS) {
|
||||
if (this.ofTranslucentBlocks == 0) {
|
||||
this.ofTranslucentBlocks = 1;
|
||||
} else if (this.ofTranslucentBlocks == 1) {
|
||||
this.ofTranslucentBlocks = 2;
|
||||
} else if (this.ofTranslucentBlocks == 2) {
|
||||
this.ofTranslucentBlocks = 0;
|
||||
} else {
|
||||
this.ofTranslucentBlocks = 0;
|
||||
}
|
||||
|
||||
this.mc.renderGlobal.loadRenderers();
|
||||
}
|
||||
|
||||
if (parOptions == GameSettings.Options.HELD_ITEM_TOOLTIPS) {
|
||||
this.heldItemTooltips = !this.heldItemTooltips;
|
||||
}
|
||||
|
||||
if (parOptions == GameSettings.Options.DROPPED_ITEMS) {
|
||||
++this.ofDroppedItems;
|
||||
|
||||
if (this.ofDroppedItems > 2) {
|
||||
this.ofDroppedItems = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (parOptions == GameSettings.Options.VIGNETTE) {
|
||||
++this.ofVignette;
|
||||
|
||||
if (this.ofVignette > 2) {
|
||||
this.ofVignette = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (parOptions == GameSettings.Options.DYNAMIC_FOV) {
|
||||
this.ofDynamicFov = !this.ofDynamicFov;
|
||||
}
|
||||
|
||||
this.saveOptions();
|
||||
}
|
||||
|
@ -780,6 +827,10 @@ public class GameSettings {
|
|||
return this.ofStars;
|
||||
case SUN_MOON:
|
||||
return this.ofSunMoon;
|
||||
case SHOW_CAPES:
|
||||
return this.ofShowCapes;
|
||||
case DYNAMIC_FOV:
|
||||
return this.ofDynamicFov;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
@ -1007,6 +1058,36 @@ public class GameSettings {
|
|||
return this.ofStars ? s + "ON" : s + "OFF";
|
||||
} else if (parOptions == GameSettings.Options.SUN_MOON) {
|
||||
return this.ofSunMoon ? s + "ON" : s + "OFF";
|
||||
} else if (parOptions == GameSettings.Options.SHOW_CAPES) {
|
||||
return this.ofShowCapes ? s + "ON" : s + "OFF";
|
||||
} else if (parOptions == GameSettings.Options.TRANSLUCENT_BLOCKS) {
|
||||
return this.ofTranslucentBlocks == 1 ? s + "Fast" : (this.ofTranslucentBlocks == 2 ? s + "Fancy" : s + "Default");
|
||||
} else if (parOptions == GameSettings.Options.HELD_ITEM_TOOLTIPS) {
|
||||
return this.heldItemTooltips ? s + "ON" : s + "OFF";
|
||||
} else if (parOptions == GameSettings.Options.DROPPED_ITEMS) {
|
||||
switch (this.ofDroppedItems) {
|
||||
case 1:
|
||||
return s + "Fast";
|
||||
|
||||
case 2:
|
||||
return s + "Fancy";
|
||||
|
||||
default:
|
||||
return s + "Default";
|
||||
}
|
||||
} else if (parOptions == GameSettings.Options.VIGNETTE) {
|
||||
switch (this.ofVignette) {
|
||||
case 1:
|
||||
return s + "Fast";
|
||||
|
||||
case 2:
|
||||
return s + "Fancy";
|
||||
|
||||
default:
|
||||
return s + "Default";
|
||||
}
|
||||
} else if (parOptions == GameSettings.Options.DYNAMIC_FOV) {
|
||||
return this.ofDynamicFov ? s + "ON" : s + "OFF";
|
||||
} else {
|
||||
return s;
|
||||
}
|
||||
|
@ -1451,6 +1532,29 @@ public class GameSettings {
|
|||
if (astring[0].equals("ofSunMoon") && astring.length >= 2) {
|
||||
this.ofSunMoon = Boolean.valueOf(astring[1]).booleanValue();
|
||||
}
|
||||
|
||||
if (astring[0].equals("ofShowCapes") && astring.length >= 2) {
|
||||
this.ofShowCapes = Boolean.valueOf(astring[1]).booleanValue();
|
||||
}
|
||||
|
||||
if (astring[0].equals("ofTranslucentBlocks") && astring.length >= 2) {
|
||||
this.ofTranslucentBlocks = Integer.valueOf(astring[1]).intValue();
|
||||
this.ofTranslucentBlocks = Config.limit(this.ofTranslucentBlocks, 0, 2);
|
||||
}
|
||||
|
||||
if (astring[0].equals("ofDroppedItems") && astring.length >= 2) {
|
||||
this.ofDroppedItems = Integer.valueOf(astring[1]).intValue();
|
||||
this.ofDroppedItems = Config.limit(this.ofDroppedItems, 0, 2);
|
||||
}
|
||||
|
||||
if (astring[0].equals("ofVignette") && astring.length >= 2) {
|
||||
this.ofVignette = Integer.valueOf(astring[1]).intValue();
|
||||
this.ofVignette = Config.limit(this.ofVignette, 0, 2);
|
||||
}
|
||||
|
||||
if (astring[0].equals("ofDynamicFov") && astring.length >= 2) {
|
||||
this.ofDynamicFov = Boolean.valueOf(astring[1]).booleanValue();
|
||||
}
|
||||
|
||||
Keyboard.setFunctionKeyModifier(keyBindFunction.getKeyCode());
|
||||
|
||||
|
@ -1595,6 +1699,11 @@ public class GameSettings {
|
|||
printwriter.println("ofSky:" + this.ofSky);
|
||||
printwriter.println("ofStars:" + this.ofStars);
|
||||
printwriter.println("ofSunMoon:" + this.ofSunMoon);
|
||||
printwriter.println("ofShowCapes:" + this.ofShowCapes);
|
||||
printwriter.println("ofTranslucentBlocks:" + this.ofTranslucentBlocks);
|
||||
printwriter.println("ofDroppedItems:" + this.ofDroppedItems);
|
||||
printwriter.println("ofVignette:" + this.ofVignette);
|
||||
printwriter.println("ofDynamicFov:" + this.ofDynamicFov);
|
||||
|
||||
for (KeyBinding keybinding : this.keyBindings) {
|
||||
printwriter.println("key_" + keybinding.getKeyDescription() + ":" + keybinding.getKeyCode());
|
||||
|
@ -1774,7 +1883,13 @@ public class GameSettings {
|
|||
TREES("Trees", false, false),
|
||||
SKY("Sky", false, false),
|
||||
STARS("Stars", false, false),
|
||||
SUN_MOON("Sun & Moon", false, false);
|
||||
SUN_MOON("Sun & Moon", false, false),
|
||||
SHOW_CAPES("Show Capes", false, false),
|
||||
TRANSLUCENT_BLOCKS("Translucent Blocks", false, false),
|
||||
HELD_ITEM_TOOLTIPS("Held Item Tooltips", false, false),
|
||||
DROPPED_ITEMS("Dropped Items", false, false),
|
||||
VIGNETTE("Vignette", false, false),
|
||||
DYNAMIC_FOV("Dynamic FOV", false, false);
|
||||
|
||||
private final boolean enumFloat;
|
||||
private final boolean enumBoolean;
|
||||
|
|
Loading…
Reference in New Issue
Block a user