Port to newest ver.
This commit is contained in:
parent
41505bc538
commit
e6baaedb99
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,5 +1,5 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
759432
javascript/Resent_EaglercraftX_1.8_International.html
Normal file
759432
javascript/Resent_EaglercraftX_1.8_International.html
Normal file
File diff suppressed because one or more lines are too long
759432
javascript/Resent_EaglercraftX_1.8_US.html
Normal file
759432
javascript/Resent_EaglercraftX_1.8_US.html
Normal file
File diff suppressed because one or more lines are too long
791308
javascript/classes.js
791308
javascript/classes.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -6,6 +6,7 @@ import java.util.List;
|
||||||
import dev.resent.module.base.Category;
|
import dev.resent.module.base.Category;
|
||||||
import dev.resent.module.base.RenderModule;
|
import dev.resent.module.base.RenderModule;
|
||||||
import dev.resent.setting.BooleanSetting;
|
import dev.resent.setting.BooleanSetting;
|
||||||
|
import dev.resent.util.misc.FuncUtils;
|
||||||
import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
||||||
|
|
||||||
public class CPS extends RenderModule {
|
public class CPS extends RenderModule {
|
||||||
|
@ -25,7 +26,7 @@ public class CPS extends RenderModule {
|
||||||
public BooleanSetting tshadow = new BooleanSetting("Text shadow", "", true);
|
public BooleanSetting tshadow = new BooleanSetting("Text shadow", "", true);
|
||||||
|
|
||||||
public int getWidth() {
|
public int getWidth() {
|
||||||
return mc.fontRendererObj.getStringWidth("[00 CPS]") + 4;
|
return mc.fontRendererObj.getStringWidth("[00 | 00]") + 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getHeight() {
|
public int getHeight() {
|
||||||
|
@ -63,13 +64,13 @@ public class CPS extends RenderModule {
|
||||||
|
|
||||||
public int getLMB() {
|
public int getLMB() {
|
||||||
final long time = System.currentTimeMillis();
|
final long time = System.currentTimeMillis();
|
||||||
this.clicksLMB.removeIf(aLong -> aLong + 1000 < time);
|
FuncUtils.removeIf(clicksLMB, aLong -> aLong + 1000 < time);
|
||||||
return this.clicksLMB.size();
|
return this.clicksLMB.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getRMB() {
|
public int getRMB() {
|
||||||
final long time = System.currentTimeMillis();
|
final long time = System.currentTimeMillis();
|
||||||
this.clicksRMB.removeIf(aLong -> aLong + 1000 < time);
|
FuncUtils.removeIf(clicksRMB, aLong -> aLong + 1000 < time);
|
||||||
return this.clicksRMB.size();
|
return this.clicksRMB.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ import dev.resent.module.base.Category;
|
||||||
import dev.resent.module.base.RenderModule;
|
import dev.resent.module.base.RenderModule;
|
||||||
import dev.resent.setting.BooleanSetting;
|
import dev.resent.setting.BooleanSetting;
|
||||||
import dev.resent.setting.ModeSetting;
|
import dev.resent.setting.ModeSetting;
|
||||||
import dev.resent.util.misc.CPSUtils;
|
|
||||||
import dev.resent.util.render.RainbowUtil;
|
import dev.resent.util.render.RainbowUtil;
|
||||||
import dev.resent.util.render.RenderUtils;
|
import dev.resent.util.render.RenderUtils;
|
||||||
import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
||||||
|
|
|
@ -1,18 +1,15 @@
|
||||||
package net.minecraft.client;
|
package net.minecraft.client;
|
||||||
|
|
||||||
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*;
|
|
||||||
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_BACK;
|
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_BACK;
|
||||||
|
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_COLOR_BUFFER_BIT;
|
||||||
|
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_DEPTH_BUFFER_BIT;
|
||||||
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_GREATER;
|
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_GREATER;
|
||||||
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_LEQUAL;
|
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_LEQUAL;
|
||||||
|
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_MAX_TEXTURE_SIZE;
|
||||||
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_MODELVIEW;
|
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_MODELVIEW;
|
||||||
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_PROJECTION;
|
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_PROJECTION;
|
||||||
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_SMOOTH;
|
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_SMOOTH;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
|
||||||
import dev.resent.Resent;
|
|
||||||
import dev.resent.ui.ClickGUI;
|
|
||||||
import dev.resent.ui.PreGUI;
|
|
||||||
import dev.resent.util.misc.W;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
|
@ -21,6 +18,14 @@ import java.util.Collections;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.Validate;
|
||||||
|
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
|
import dev.resent.Resent;
|
||||||
|
import dev.resent.ui.PreGUI;
|
||||||
|
import dev.resent.util.misc.W;
|
||||||
import net.lax1dude.eaglercraft.v1_8.Display;
|
import net.lax1dude.eaglercraft.v1_8.Display;
|
||||||
import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||||
import net.lax1dude.eaglercraft.v1_8.HString;
|
import net.lax1dude.eaglercraft.v1_8.HString;
|
||||||
|
@ -156,7 +161,6 @@ import net.minecraft.world.EnumDifficulty;
|
||||||
import net.minecraft.world.WorldProviderEnd;
|
import net.minecraft.world.WorldProviderEnd;
|
||||||
import net.minecraft.world.WorldProviderHell;
|
import net.minecraft.world.WorldProviderHell;
|
||||||
import net.minecraft.world.WorldSettings;
|
import net.minecraft.world.WorldSettings;
|
||||||
import org.apache.commons.lang3.Validate;
|
|
||||||
|
|
||||||
/**+
|
/**+
|
||||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||||
|
|
|
@ -1,17 +1,30 @@
|
||||||
package net.minecraft.client.gui;
|
package net.minecraft.client.gui;
|
||||||
|
|
||||||
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*;
|
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_ONE_MINUS_DST_COLOR;
|
||||||
|
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_ONE_MINUS_SRC_ALPHA;
|
||||||
|
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_ONE_MINUS_SRC_COLOR;
|
||||||
|
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_SRC_ALPHA;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
|
||||||
import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite;
|
|
||||||
|
|
||||||
import com.google.common.base.Predicate;
|
import com.google.common.base.Predicate;
|
||||||
import com.google.common.collect.Iterables;
|
import com.google.common.collect.Iterables;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
|
import dev.resent.Resent;
|
||||||
|
import dev.resent.animation.SimpleAnimation;
|
||||||
|
import dev.resent.module.base.Mod;
|
||||||
|
import dev.resent.module.base.ModManager;
|
||||||
|
import dev.resent.module.base.RenderModule;
|
||||||
|
import dev.resent.module.impl.misc.Crosshair;
|
||||||
|
import dev.resent.ui.HUDConfigScreen;
|
||||||
|
import dev.resent.util.misc.W;
|
||||||
|
import dev.resent.util.render.Color;
|
||||||
|
import dev.resent.util.render.RenderUtils;
|
||||||
|
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||||
|
import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite;
|
||||||
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||||
import net.lax1dude.eaglercraft.v1_8.opengl.OpenGlHelper;
|
import net.lax1dude.eaglercraft.v1_8.opengl.OpenGlHelper;
|
||||||
import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
|
import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
|
||||||
|
@ -73,7 +86,7 @@ public class GuiIngame extends Gui {
|
||||||
private static final ResourceLocation pumpkinBlurTexPath = new ResourceLocation("textures/misc/pumpkinblur.png");
|
private static final ResourceLocation pumpkinBlurTexPath = new ResourceLocation("textures/misc/pumpkinblur.png");
|
||||||
private final EaglercraftRandom rand = new EaglercraftRandom();
|
private final EaglercraftRandom rand = new EaglercraftRandom();
|
||||||
private final Minecraft mc;
|
private final Minecraft mc;
|
||||||
private final RenderItem itemRenderer;
|
public static RenderItem itemRenderer;
|
||||||
private final GuiNewChat persistantChatGUI;
|
private final GuiNewChat persistantChatGUI;
|
||||||
private int updateCounter;
|
private int updateCounter;
|
||||||
/**+
|
/**+
|
||||||
|
@ -111,7 +124,7 @@ public class GuiIngame extends Gui {
|
||||||
|
|
||||||
public GuiIngame(Minecraft mcIn) {
|
public GuiIngame(Minecraft mcIn) {
|
||||||
this.mc = mcIn;
|
this.mc = mcIn;
|
||||||
this.itemRenderer = mcIn.getRenderItem();
|
itemRenderer = mcIn.getRenderItem();
|
||||||
this.overlayDebug = new GuiOverlayDebug(mcIn);
|
this.overlayDebug = new GuiOverlayDebug(mcIn);
|
||||||
this.spectatorGui = new GuiSpectator(mcIn);
|
this.spectatorGui = new GuiSpectator(mcIn);
|
||||||
this.persistantChatGUI = new GuiNewChat(mcIn);
|
this.persistantChatGUI = new GuiNewChat(mcIn);
|
||||||
|
@ -277,7 +290,7 @@ public class GuiIngame extends Gui {
|
||||||
|
|
||||||
ScoreObjective scoreobjective1 = scoreobjective != null ? scoreobjective
|
ScoreObjective scoreobjective1 = scoreobjective != null ? scoreobjective
|
||||||
: scoreboard.getObjectiveInDisplaySlot(1);
|
: scoreboard.getObjectiveInDisplaySlot(1);
|
||||||
if (scoreobjective1 != null) {
|
if (scoreobjective1 != null && W.scoreboard().isEnabled()) {
|
||||||
this.renderScoreboard(scoreobjective1, scaledresolution);
|
this.renderScoreboard(scoreobjective1, scaledresolution);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -302,6 +315,14 @@ public class GuiIngame extends Gui {
|
||||||
this.overlayPlayerList.renderPlayerlist(i, scoreboard, scoreobjective1);
|
this.overlayPlayerList.renderPlayerlist(i, scoreboard, scoreobjective1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (Mod m : Resent.INSTANCE.modManager.modules) {
|
||||||
|
if (m.isEnabled() && (m instanceof RenderModule)) {
|
||||||
|
if (!(mc.currentScreen instanceof HUDConfigScreen)) {
|
||||||
|
((RenderModule) m).draw();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
GlStateManager.disableLighting();
|
GlStateManager.disableLighting();
|
||||||
GlStateManager.enableAlpha();
|
GlStateManager.enableAlpha();
|
||||||
|
@ -314,10 +335,18 @@ public class GuiIngame extends Gui {
|
||||||
GlStateManager.enableBlend();
|
GlStateManager.enableBlend();
|
||||||
GlStateManager.tryBlendFuncSeparate(GL_ONE_MINUS_DST_COLOR, GL_ONE_MINUS_SRC_COLOR, 1, 0);
|
GlStateManager.tryBlendFuncSeparate(GL_ONE_MINUS_DST_COLOR, GL_ONE_MINUS_SRC_COLOR, 1, 0);
|
||||||
GlStateManager.enableAlpha();
|
GlStateManager.enableAlpha();
|
||||||
|
|
||||||
|
if (Minecraft.getMinecraft().pointedEntity != null && ModManager.crosshair.isEnabled()){
|
||||||
|
GlStateManager.color(RenderUtils.getColorWithoutRGB(Crosshair.color).getRed(), RenderUtils.getColorWithoutRGB(Crosshair.color).getGreen(), RenderUtils.getColorWithoutRGB(Crosshair.color).getBlue());
|
||||||
|
GlStateManager.disableAlpha();
|
||||||
|
}
|
||||||
|
|
||||||
this.drawTexturedModalRect(scaledResWidth / 2 - 7, scaledResHeight / 2 - 7, 0, 0, 16, 16);
|
this.drawTexturedModalRect(scaledResWidth / 2 - 7, scaledResHeight / 2 - 7, 0, 0, 16, 16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public SimpleAnimation simpleAnimation = new SimpleAnimation(0.0F);
|
||||||
|
|
||||||
protected void renderTooltip(ScaledResolution sr, float partialTicks) {
|
protected void renderTooltip(ScaledResolution sr, float partialTicks) {
|
||||||
if (this.mc.getRenderViewEntity() instanceof EntityPlayer) {
|
if (this.mc.getRenderViewEntity() instanceof EntityPlayer) {
|
||||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
|
@ -326,9 +355,19 @@ public class GuiIngame extends Gui {
|
||||||
int i = sr.getScaledWidth() / 2;
|
int i = sr.getScaledWidth() / 2;
|
||||||
float f = this.zLevel;
|
float f = this.zLevel;
|
||||||
this.zLevel = -90.0F;
|
this.zLevel = -90.0F;
|
||||||
this.drawTexturedModalRect(i - 91, sr.getScaledHeight() - 22, 0, 0, 182, 22);
|
|
||||||
this.drawTexturedModalRect(i - 91 - 1 + entityplayer.inventory.currentItem * 20,
|
simpleAnimation.setAnimation(entityplayer.inventory.currentItem * 20, ModManager.hotbar.getSpeed());
|
||||||
|
int itemX = i - 90 + ((int) simpleAnimation.getValue());
|
||||||
|
|
||||||
|
if(!ModManager.hotbar.isEnabled()){
|
||||||
|
this.drawTexturedModalRect(i - 91, sr.getScaledHeight() - 22, 0, 0, 182, 22);
|
||||||
|
this.drawTexturedModalRect(i - 91 - 1 + entityplayer.inventory.currentItem * 20,
|
||||||
sr.getScaledHeight() - 22 - 1, 0, 22, 24, 22);
|
sr.getScaledHeight() - 22 - 1, 0, 22, 24, 22);
|
||||||
|
}else {
|
||||||
|
drawRect(itemX, sr.getScaledHeight() - 21, itemX + 24, sr.getScaledHeight(), new Color(230, 230, 230, 180).getRGB());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
this.zLevel = f;
|
this.zLevel = f;
|
||||||
GlStateManager.enableRescaleNormal();
|
GlStateManager.enableRescaleNormal();
|
||||||
GlStateManager.enableBlend();
|
GlStateManager.enableBlend();
|
||||||
|
@ -504,6 +543,7 @@ public class GuiIngame extends Gui {
|
||||||
int l = parScaledResolution.getScaledWidth() - b0 + 2;
|
int l = parScaledResolution.getScaledWidth() - b0 + 2;
|
||||||
drawRect(k1 - 2, k, l, k + this.getFontRenderer().FONT_HEIGHT, 1342177280);
|
drawRect(k1 - 2, k, l, k + this.getFontRenderer().FONT_HEIGHT, 1342177280);
|
||||||
this.getFontRenderer().drawString(s1, k1, k, 553648127);
|
this.getFontRenderer().drawString(s1, k1, k, 553648127);
|
||||||
|
if (W.scoreboard().numbers.getValue())
|
||||||
this.getFontRenderer().drawString(s2, l - this.getFontRenderer().getStringWidth(s2), k, 553648127);
|
this.getFontRenderer().drawString(s2, l - this.getFontRenderer().getStringWidth(s2), k, 553648127);
|
||||||
if (j == arraylist1.size()) {
|
if (j == arraylist1.size()) {
|
||||||
String s3 = parScoreObjective.getDisplayName();
|
String s3 = parScoreObjective.getDisplayName();
|
||||||
|
@ -881,12 +921,12 @@ public class GuiIngame extends Gui {
|
||||||
GlStateManager.translate((float) (-(xPos + 8)), (float) (-(yPos + 12)), 0.0F);
|
GlStateManager.translate((float) (-(xPos + 8)), (float) (-(yPos + 12)), 0.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.itemRenderer.renderItemAndEffectIntoGUI(itemstack, xPos, yPos);
|
itemRenderer.renderItemAndEffectIntoGUI(itemstack, xPos, yPos);
|
||||||
if (f > 0.0F) {
|
if (f > 0.0F) {
|
||||||
GlStateManager.popMatrix();
|
GlStateManager.popMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.itemRenderer.renderItemOverlays(this.mc.fontRendererObj, itemstack, xPos, yPos);
|
itemRenderer.renderItemOverlays(this.mc.fontRendererObj, itemstack, xPos, yPos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,6 @@ package net.minecraft.client.gui;
|
||||||
|
|
||||||
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*;
|
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*;
|
||||||
|
|
||||||
import com.google.common.base.Strings;
|
|
||||||
import com.google.common.collect.Lists;
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
@ -12,6 +10,10 @@ import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
|
import com.google.common.base.Strings;
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.v1_8.Display;
|
import net.lax1dude.eaglercraft.v1_8.Display;
|
||||||
import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||||
import net.lax1dude.eaglercraft.v1_8.HString;
|
import net.lax1dude.eaglercraft.v1_8.HString;
|
||||||
|
@ -60,14 +62,13 @@ import net.minecraft.world.chunk.Chunk;
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class GuiOverlayDebug extends Gui {
|
public class GuiOverlayDebug extends Gui {
|
||||||
|
private final Minecraft mc;
|
||||||
|
private final FontRenderer fontRenderer;
|
||||||
|
|
||||||
private final Minecraft mc;
|
public GuiOverlayDebug(Minecraft mc) {
|
||||||
private final FontRenderer fontRenderer;
|
this.mc = mc;
|
||||||
|
this.fontRenderer = mc.fontRendererObj;
|
||||||
public GuiOverlayDebug(Minecraft mc) {
|
}
|
||||||
this.mc = mc;
|
|
||||||
this.fontRenderer = mc.fontRendererObj;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void renderDebugInfo(ScaledResolution scaledResolutionIn) {
|
public void renderDebugInfo(ScaledResolution scaledResolutionIn) {
|
||||||
int ww = scaledResolutionIn.getScaledWidth();
|
int ww = scaledResolutionIn.getScaledWidth();
|
||||||
|
@ -84,147 +85,171 @@ public class GuiOverlayDebug extends Gui {
|
||||||
} else {
|
} else {
|
||||||
int i = 2;
|
int i = 2;
|
||||||
|
|
||||||
if (this.mc.gameSettings.hudFps) {
|
if (this.mc.gameSettings.hudFps) {
|
||||||
drawFPS(2, i);
|
drawFPS(2, i);
|
||||||
i += 9;
|
i += 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.mc.gameSettings.hudCoords) {
|
if (this.mc.gameSettings.hudCoords) {
|
||||||
drawXYZ(2, i);
|
drawXYZ(2, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.mc.currentScreen == null || !(this.mc.currentScreen instanceof GuiChat)) {
|
if (this.mc.currentScreen == null || !(this.mc.currentScreen instanceof GuiChat)) {
|
||||||
if (this.mc.gameSettings.hudStats) {
|
if (this.mc.gameSettings.hudStats) {
|
||||||
drawStatsHUD(ww - 2, hh - 2);
|
drawStatsHUD(ww - 2, hh - 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.mc.gameSettings.hudWorld) {
|
if (this.mc.gameSettings.hudWorld) {
|
||||||
drawWorldHUD(2, hh - 2);
|
drawWorldHUD(2, hh - 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.mc.gameSettings.hudCoords && this.mc.joinWorldTickCounter < 80) {
|
if (this.mc.gameSettings.hudCoords && this.mc.joinWorldTickCounter < 80) {
|
||||||
if (this.mc.joinWorldTickCounter > 70) {
|
if (this.mc.joinWorldTickCounter > 70) {
|
||||||
GlStateManager.enableBlend();
|
GlStateManager.enableBlend();
|
||||||
GlStateManager.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
GlStateManager.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
}
|
}
|
||||||
int i = this.mc.joinWorldTickCounter - 70;
|
int i = this.mc.joinWorldTickCounter - 70;
|
||||||
if (i < 0) i = 0;
|
if (i < 0)
|
||||||
drawHideHUD(ww / 2, hh - 70, (10 - i) * 0xFF / 10);
|
i = 0;
|
||||||
if (this.mc.joinWorldTickCounter > 70) {
|
drawHideHUD(ww / 2, hh - 70, (10 - i) * 0xFF / 10);
|
||||||
GlStateManager.disableBlend();
|
if (this.mc.joinWorldTickCounter > 70) {
|
||||||
}
|
GlStateManager.disableBlend();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.mc.mcProfiler.endSection();
|
this.mc.mcProfiler.endSection();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void drawFPS(int x, int y) {
|
private void drawFPS(int x, int y) {
|
||||||
this.fontRenderer.drawStringWithShadow(this.mc.renderGlobal.getDebugInfoShort(), x, y, 0xFFFFFF);
|
this.fontRenderer.drawStringWithShadow(this.mc.renderGlobal.getDebugInfoShort(), x, y, 0xFFFFFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void drawXYZ(int x, int y) {
|
private void drawXYZ(int x, int y) {
|
||||||
Entity e = mc.getRenderViewEntity();
|
Entity e = mc.getRenderViewEntity();
|
||||||
BlockPos blockpos = new BlockPos(e.posX, e.getEntityBoundingBox().minY, e.posZ);
|
BlockPos blockpos = new BlockPos(e.posX, e.getEntityBoundingBox().minY, e.posZ);
|
||||||
this.fontRenderer.drawStringWithShadow("x: " + blockpos.getX() + ", y: " + blockpos.getY() + ", z: " + blockpos.getZ(), x, y, 0xFFFFFF);
|
this.fontRenderer.drawStringWithShadow(
|
||||||
}
|
"x: " + blockpos.getX() + ", y: " + blockpos.getY() + ", z: " + blockpos.getZ(), x, y, 0xFFFFFF);
|
||||||
|
}
|
||||||
|
|
||||||
private void drawStatsHUD(int x, int y) {
|
private void drawStatsHUD(int x, int y) {
|
||||||
int i = 9;
|
int i = 9;
|
||||||
|
|
||||||
String line = "Walk: " + EnumChatFormatting.YELLOW + HString.format("%.2f", mc.thePlayer.getAIMoveSpeed()) + EnumChatFormatting.WHITE + " Flight: " + (mc.thePlayer.capabilities.allowFlying ? ("" + EnumChatFormatting.YELLOW + mc.thePlayer.capabilities.getFlySpeed()) : EnumChatFormatting.RED + "No");
|
String line = "Walk: " + EnumChatFormatting.YELLOW + HString.format("%.2f", mc.thePlayer.getAIMoveSpeed())
|
||||||
int lw = fontRenderer.getStringWidth(line);
|
+ EnumChatFormatting.WHITE + " Flight: "
|
||||||
this.fontRenderer.drawStringWithShadow(line, x - lw, y - i, 0xFFFFFF);
|
+ (mc.thePlayer.capabilities.allowFlying
|
||||||
i += 11;
|
? ("" + EnumChatFormatting.YELLOW + mc.thePlayer.capabilities.getFlySpeed())
|
||||||
|
: EnumChatFormatting.RED + "No");
|
||||||
|
int lw = fontRenderer.getStringWidth(line);
|
||||||
|
this.fontRenderer.drawStringWithShadow(line, x - lw, y - i, 0xFFFFFF);
|
||||||
|
i += 11;
|
||||||
|
|
||||||
line = "Food: " + EnumChatFormatting.YELLOW + mc.thePlayer.getFoodStats().getFoodLevel() + EnumChatFormatting.WHITE + ", Sat: " + EnumChatFormatting.YELLOW + HString.format("%.1f", mc.thePlayer.getFoodStats().getSaturationLevel());
|
line = "Food: " + EnumChatFormatting.YELLOW + mc.thePlayer.getFoodStats().getFoodLevel()
|
||||||
lw = fontRenderer.getStringWidth(line);
|
+ EnumChatFormatting.WHITE + ", Sat: " + EnumChatFormatting.YELLOW
|
||||||
this.fontRenderer.drawStringWithShadow(line, x - lw, y - i, 0xFFFFFF);
|
+ HString.format("%.1f", mc.thePlayer.getFoodStats().getSaturationLevel());
|
||||||
i += 11;
|
lw = fontRenderer.getStringWidth(line);
|
||||||
|
this.fontRenderer.drawStringWithShadow(line, x - lw, y - i, 0xFFFFFF);
|
||||||
|
i += 11;
|
||||||
|
|
||||||
line = "Amr: " + EnumChatFormatting.YELLOW + mc.thePlayer.getTotalArmorValue() + EnumChatFormatting.WHITE + ", Health: " + EnumChatFormatting.RED + HString.format("%.1f", mc.thePlayer.getHealth());
|
line = "Amr: " + EnumChatFormatting.YELLOW + mc.thePlayer.getTotalArmorValue() + EnumChatFormatting.WHITE
|
||||||
lw = fontRenderer.getStringWidth(line);
|
+ ", Health: " + EnumChatFormatting.RED + HString.format("%.1f", mc.thePlayer.getHealth());
|
||||||
this.fontRenderer.drawStringWithShadow(line, x - lw, y - i, 0xFFFFFF);
|
lw = fontRenderer.getStringWidth(line);
|
||||||
i += 11;
|
this.fontRenderer.drawStringWithShadow(line, x - lw, y - i, 0xFFFFFF);
|
||||||
|
i += 11;
|
||||||
|
|
||||||
int xpc = mc.thePlayer.xpBarCap();
|
int xpc = mc.thePlayer.xpBarCap();
|
||||||
line = "XP: " + EnumChatFormatting.GREEN + MathHelper.floor_float(mc.thePlayer.experience * xpc) + EnumChatFormatting.WHITE + " / " + EnumChatFormatting.GREEN + xpc;
|
line = "XP: " + EnumChatFormatting.GREEN + MathHelper.floor_float(mc.thePlayer.experience * xpc)
|
||||||
lw = fontRenderer.getStringWidth(line);
|
+ EnumChatFormatting.WHITE + " / " + EnumChatFormatting.GREEN + xpc;
|
||||||
this.fontRenderer.drawStringWithShadow(line, x - lw, y - i, 0xFFFFFF);
|
lw = fontRenderer.getStringWidth(line);
|
||||||
i += 11;
|
this.fontRenderer.drawStringWithShadow(line, x - lw, y - i, 0xFFFFFF);
|
||||||
|
i += 11;
|
||||||
|
|
||||||
Iterator<PotionEffect> potions = mc.thePlayer.getActivePotionEffects().iterator();
|
Iterator<PotionEffect> potions = mc.thePlayer.getActivePotionEffects().iterator();
|
||||||
if (potions.hasNext()) {
|
if (potions.hasNext()) {
|
||||||
while (potions.hasNext()) {
|
while (potions.hasNext()) {
|
||||||
i += 11;
|
i += 11;
|
||||||
PotionEffect e = potions.next();
|
PotionEffect e = potions.next();
|
||||||
int t = e.getDuration() / 20;
|
int t = e.getDuration() / 20;
|
||||||
int m = t / 60;
|
int m = t / 60;
|
||||||
int s = t % 60;
|
int s = t % 60;
|
||||||
int j = e.getAmplifier();
|
int j = e.getAmplifier();
|
||||||
if (j > 0) {
|
if (j > 0) {
|
||||||
line = I18n.format(e.getEffectName()) + (j > 0 ? (" " + EnumChatFormatting.YELLOW + EnumChatFormatting.BOLD + I18n.format("potion.potency." + j) + EnumChatFormatting.RESET) : "") + " [" + EnumChatFormatting.YELLOW + HString.format("%02d:%02d", m, s) + EnumChatFormatting.RESET + "]";
|
line = I18n.format(e.getEffectName())
|
||||||
} else {
|
+ (j > 0 ? (" " + EnumChatFormatting.YELLOW + EnumChatFormatting.BOLD
|
||||||
line = I18n.format(e.getEffectName()) + " [" + EnumChatFormatting.YELLOW + HString.format("%02d:%02d", m, s) + EnumChatFormatting.RESET + "]";
|
+ I18n.format("potion.potency." + j) + EnumChatFormatting.RESET) : "")
|
||||||
}
|
+ " [" + EnumChatFormatting.YELLOW + HString.format("%02d:%02d", m, s)
|
||||||
lw = fontRenderer.getStringWidth(line);
|
+ EnumChatFormatting.RESET + "]";
|
||||||
this.fontRenderer.drawStringWithShadow(line, x - lw, y - i, 0xFFFFFF);
|
} else {
|
||||||
}
|
line = I18n.format(e.getEffectName()) + " [" + EnumChatFormatting.YELLOW
|
||||||
}
|
+ HString.format("%02d:%02d", m, s) + EnumChatFormatting.RESET + "]";
|
||||||
}
|
}
|
||||||
|
lw = fontRenderer.getStringWidth(line);
|
||||||
|
this.fontRenderer.drawStringWithShadow(line, x - lw, y - i, 0xFFFFFF);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static final int ticksAtMidnight = 18000;
|
}
|
||||||
public static final int ticksPerDay = 24000;
|
|
||||||
public static final int ticksPerHour = 1000;
|
|
||||||
public static final double ticksPerMinute = 1000d / 60d;
|
|
||||||
public static final double ticksPerSecond = 1000d / 60d / 60d;
|
|
||||||
private static final SimpleDateFormat SDFTwentyFour = new SimpleDateFormat("HH:mm", Locale.ENGLISH);
|
|
||||||
private static final SimpleDateFormat SDFTwelve = new SimpleDateFormat("h:mm aa", Locale.ENGLISH);
|
|
||||||
|
|
||||||
private void drawWorldHUD(int x, int y) {
|
public static final int ticksAtMidnight = 18000;
|
||||||
/*
|
public static final int ticksPerDay = 24000;
|
||||||
* Math was taken from: https://github.com/EssentialsX/Essentials/blob/
|
public static final int ticksPerHour = 1000;
|
||||||
* dc7fb919391d62de45e17b51ae1e6fe3e66d7ac6/Essentials/src/main/java/com/
|
public static final double ticksPerMinute = 1000d / 60d;
|
||||||
* earth2me/essentials/utils/DescParseTickFormat.java
|
public static final double ticksPerSecond = 1000d / 60d / 60d;
|
||||||
*/
|
private static final SimpleDateFormat SDFTwentyFour = new SimpleDateFormat("HH:mm", Locale.ENGLISH);
|
||||||
long totalTicks = mc.theWorld.getWorldTime();
|
private static final SimpleDateFormat SDFTwelve = new SimpleDateFormat("h:mm aa", Locale.ENGLISH);
|
||||||
long ticks = totalTicks;
|
|
||||||
ticks = ticks - ticksAtMidnight + ticksPerDay;
|
|
||||||
final long days = ticks / ticksPerDay;
|
|
||||||
ticks -= days * ticksPerDay;
|
|
||||||
final long hours = ticks / ticksPerHour;
|
|
||||||
ticks -= hours * ticksPerHour;
|
|
||||||
final long minutes = (long) Math.floor(ticks / ticksPerMinute);
|
|
||||||
final double dticks = ticks - minutes * ticksPerMinute;
|
|
||||||
final long seconds = (long) Math.floor(dticks / ticksPerSecond);
|
|
||||||
|
|
||||||
// TODO: why does desktop JRE not apply "GMT" correctly?
|
private void drawWorldHUD(int x, int y) {
|
||||||
final Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT"), Locale.ENGLISH);
|
/*
|
||||||
|
* Math was taken from: https://github.com/EssentialsX/Essentials/blob/
|
||||||
|
* dc7fb919391d62de45e17b51ae1e6fe3e66d7ac6/Essentials/src/main/java/com/
|
||||||
|
* earth2me/essentials/utils/DescParseTickFormat.java
|
||||||
|
*/
|
||||||
|
long totalTicks = mc.theWorld.getWorldTime();
|
||||||
|
long ticks = totalTicks;
|
||||||
|
ticks = ticks - ticksAtMidnight + ticksPerDay;
|
||||||
|
final long days = ticks / ticksPerDay;
|
||||||
|
ticks -= days * ticksPerDay;
|
||||||
|
final long hours = ticks / ticksPerHour;
|
||||||
|
ticks -= hours * ticksPerHour;
|
||||||
|
final long minutes = (long) Math.floor(ticks / ticksPerMinute);
|
||||||
|
final double dticks = ticks - minutes * ticksPerMinute;
|
||||||
|
final long seconds = (long) Math.floor(dticks / ticksPerSecond);
|
||||||
|
|
||||||
cal.setLenient(true);
|
// TODO: why does desktop JRE not apply "GMT" correctly?
|
||||||
cal.set(0, Calendar.JANUARY, 1, 0, 0, 0);
|
final Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT"), Locale.ENGLISH);
|
||||||
cal.add(Calendar.DAY_OF_YEAR, (int) days);
|
|
||||||
cal.add(Calendar.HOUR_OF_DAY, (int) hours);
|
|
||||||
cal.add(Calendar.MINUTE, (int) minutes);
|
|
||||||
cal.add(Calendar.SECOND, (int) seconds + 1);
|
|
||||||
|
|
||||||
String timeString = EnumChatFormatting.WHITE + "Day " + ((totalTicks + 30000l) / 24000l) + " (" + EnumChatFormatting.YELLOW + (this.mc.gameSettings.hud24h ? SDFTwentyFour : SDFTwelve).format(cal.getTime()) + EnumChatFormatting.WHITE + ")";
|
cal.setLenient(true);
|
||||||
|
cal.set(0, Calendar.JANUARY, 1, 0, 0, 0);
|
||||||
|
cal.add(Calendar.DAY_OF_YEAR, (int) days);
|
||||||
|
cal.add(Calendar.HOUR_OF_DAY, (int) hours);
|
||||||
|
cal.add(Calendar.MINUTE, (int) minutes);
|
||||||
|
cal.add(Calendar.SECOND, (int) seconds + 1);
|
||||||
|
|
||||||
Entity e = mc.getRenderViewEntity();
|
String timeString = EnumChatFormatting.WHITE + "Day " + ((totalTicks + 30000l) / 24000l) + " ("
|
||||||
BlockPos blockpos = new BlockPos(e.posX, MathHelper.clamp_double(e.getEntityBoundingBox().minY, 0.0D, 254.0D), e.posZ);
|
+ EnumChatFormatting.YELLOW
|
||||||
BiomeGenBase biome = mc.theWorld.getBiomeGenForCoords(blockpos);
|
+ (this.mc.gameSettings.hud24h ? SDFTwentyFour : SDFTwelve).format(cal.getTime())
|
||||||
|
+ EnumChatFormatting.WHITE + ")";
|
||||||
|
|
||||||
Chunk c = mc.theWorld.getChunkFromBlockCoords(blockpos);
|
Entity e = mc.getRenderViewEntity();
|
||||||
int blockLight = c.getLightFor(EnumSkyBlock.BLOCK, blockpos);
|
BlockPos blockpos = new BlockPos(e.posX, MathHelper.clamp_double(e.getEntityBoundingBox().minY, 0.0D, 254.0D),
|
||||||
int skyLight = c.getLightFor(EnumSkyBlock.SKY, blockpos) - mc.theWorld.calculateSkylightSubtracted(1.0f);
|
e.posZ);
|
||||||
int totalLight = Math.max(blockLight, skyLight);
|
BiomeGenBase biome = mc.theWorld.getBiomeGenForCoords(blockpos);
|
||||||
EnumChatFormatting lightColor = blockLight < 8 ? ((skyLight < 8 || !mc.theWorld.isDaytime()) ? EnumChatFormatting.RED : EnumChatFormatting.YELLOW) : EnumChatFormatting.GREEN;
|
|
||||||
String lightString = "Light: " + lightColor + totalLight + EnumChatFormatting.WHITE;
|
|
||||||
|
|
||||||
float temp = biome.getFloatTemperature(blockpos);
|
Chunk c = mc.theWorld.getChunkFromBlockCoords(blockpos);
|
||||||
|
int blockLight = c.getLightFor(EnumSkyBlock.BLOCK, blockpos);
|
||||||
|
int skyLight = c.getLightFor(EnumSkyBlock.SKY, blockpos) - mc.theWorld.calculateSkylightSubtracted(1.0f);
|
||||||
|
int totalLight = Math.max(blockLight, skyLight);
|
||||||
|
EnumChatFormatting lightColor = blockLight < 8
|
||||||
|
? ((skyLight < 8 || !mc.theWorld.isDaytime()) ? EnumChatFormatting.RED : EnumChatFormatting.YELLOW)
|
||||||
|
: EnumChatFormatting.GREEN;
|
||||||
|
String lightString = "Light: " + lightColor + totalLight + EnumChatFormatting.WHITE;
|
||||||
|
|
||||||
String tempString = "Temp: " + ((blockLight > 11 || temp > 0.15f) ? EnumChatFormatting.YELLOW : EnumChatFormatting.AQUA) + HString.format("%.2f", temp) + EnumChatFormatting.WHITE;
|
float temp = biome.getFloatTemperature(blockpos);
|
||||||
|
|
||||||
|
String tempString = "Temp: "
|
||||||
|
+ ((blockLight > 11 || temp > 0.15f) ? EnumChatFormatting.YELLOW : EnumChatFormatting.AQUA)
|
||||||
|
+ HString.format("%.2f", temp) + EnumChatFormatting.WHITE;
|
||||||
|
|
||||||
this.fontRenderer.drawStringWithShadow(timeString, x, y - 30, 0xFFFFFF);
|
this.fontRenderer.drawStringWithShadow(timeString, x, y - 30, 0xFFFFFF);
|
||||||
this.fontRenderer.drawStringWithShadow("Biome: " + EnumChatFormatting.AQUA + biome.biomeName, x, y - 19,
|
this.fontRenderer.drawStringWithShadow("Biome: " + EnumChatFormatting.AQUA + biome.biomeName, x, y - 19,
|
||||||
|
@ -232,221 +257,247 @@ public class GuiOverlayDebug extends Gui {
|
||||||
this.fontRenderer.drawStringWithShadow(lightString + " " + tempString, x, y - 8, 0xFFFFFF);
|
this.fontRenderer.drawStringWithShadow(lightString + " " + tempString, x, y - 8, 0xFFFFFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void drawHideHUD(int x, int y, int fade) {
|
private void drawHideHUD(int x, int y, int fade) {
|
||||||
drawCenteredString(fontRenderer, I18n.format("options.hud.note"), x, y, 0xEECC00 | (fade << 24));
|
drawCenteredString(fontRenderer, I18n.format("options.hud.note"), x, y, 0xEECC00 | (fade << 24));
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isReducedDebug() {
|
private boolean isReducedDebug() {
|
||||||
return this.mc.thePlayer.hasReducedDebug() || this.mc.gameSettings.reducedDebugInfo;
|
return this.mc.thePlayer.hasReducedDebug() || this.mc.gameSettings.reducedDebugInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void renderDebugInfoLeft() {
|
protected void renderDebugInfoLeft() {
|
||||||
List list = this.call();
|
List list = this.call();
|
||||||
|
|
||||||
for (int i = 0; i < list.size(); ++i) {
|
for (int i = 0; i < list.size(); ++i) {
|
||||||
String s = (String) list.get(i);
|
String s = (String) list.get(i);
|
||||||
if (!Strings.isNullOrEmpty(s)) {
|
if (!Strings.isNullOrEmpty(s)) {
|
||||||
int j = this.fontRenderer.FONT_HEIGHT;
|
int j = this.fontRenderer.FONT_HEIGHT;
|
||||||
int k = this.fontRenderer.getStringWidth(s);
|
int k = this.fontRenderer.getStringWidth(s);
|
||||||
boolean flag = true;
|
boolean flag = true;
|
||||||
int l = 2 + j * i;
|
int l = 2 + j * i;
|
||||||
drawRect(1, l - 1, 2 + k + 1, l + j - 1, -1873784752);
|
drawRect(1, l - 1, 2 + k + 1, l + j - 1, -1873784752);
|
||||||
this.fontRenderer.drawString(s, 2, l, 14737632);
|
this.fontRenderer.drawString(s, 2, l, 14737632);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
protected void renderDebugInfoRight(ScaledResolution parScaledResolution) {
|
}
|
||||||
List list = this.getDebugInfoRight();
|
|
||||||
|
|
||||||
for (int i = 0; i < list.size(); ++i) {
|
protected void renderDebugInfoRight(ScaledResolution parScaledResolution) {
|
||||||
String s = (String) list.get(i);
|
List list = this.getDebugInfoRight();
|
||||||
if (!Strings.isNullOrEmpty(s)) {
|
|
||||||
int j = this.fontRenderer.FONT_HEIGHT;
|
|
||||||
int k = this.fontRenderer.getStringWidth(s);
|
|
||||||
int l = parScaledResolution.getScaledWidth() - 2 - k;
|
|
||||||
int i1 = 2 + j * i;
|
|
||||||
drawRect(l - 1, i1 - 1, l + k + 1, i1 + j - 1, -1873784752);
|
|
||||||
this.fontRenderer.drawString(s, l, i1, 14737632);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected List<String> call() {
|
for (int i = 0; i < list.size(); ++i) {
|
||||||
if (!this.mc.gameSettings.showDebugInfo) {
|
String s = (String) list.get(i);
|
||||||
BlockPos blockpos = new BlockPos(this.mc.getRenderViewEntity().posX, this.mc.getRenderViewEntity().getEntityBoundingBox().minY, this.mc.getRenderViewEntity().posZ);
|
if (!Strings.isNullOrEmpty(s)) {
|
||||||
return Lists.newArrayList(new String[] { this.mc.renderGlobal.getDebugInfoShort(), "x: " + blockpos.getX() + ", y: " + blockpos.getY() + ", z: " + blockpos.getZ() });
|
int j = this.fontRenderer.FONT_HEIGHT;
|
||||||
}
|
int k = this.fontRenderer.getStringWidth(s);
|
||||||
|
int l = parScaledResolution.getScaledWidth() - 2 - k;
|
||||||
|
int i1 = 2 + j * i;
|
||||||
|
drawRect(l - 1, i1 - 1, l + k + 1, i1 + j - 1, -1873784752);
|
||||||
|
this.fontRenderer.drawString(s, l, i1, 14737632);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
BlockPos blockpos = new BlockPos(this.mc.getRenderViewEntity().posX, this.mc.getRenderViewEntity().getEntityBoundingBox().minY, this.mc.getRenderViewEntity().posZ);
|
}
|
||||||
if (this.isReducedDebug()) {
|
|
||||||
return Lists.newArrayList(
|
|
||||||
new String[] {
|
|
||||||
"Minecraft 1.8.8 (" + this.mc.getVersion() + "/" + ClientBrandRetriever.getClientModName() + ")",
|
|
||||||
this.mc.debug,
|
|
||||||
this.mc.renderGlobal.getDebugInfoRenders(),
|
|
||||||
this.mc.renderGlobal.getDebugInfoEntities(),
|
|
||||||
"P: " + this.mc.effectRenderer.getStatistics() + ". T: " + this.mc.theWorld.getDebugLoadedEntities(),
|
|
||||||
this.mc.theWorld.getProviderName(),
|
|
||||||
"",
|
|
||||||
HString.format("Chunk-relative: %d %d %d", new Object[] { Integer.valueOf(blockpos.getX() & 15), Integer.valueOf(blockpos.getY() & 15), Integer.valueOf(blockpos.getZ() & 15) })
|
|
||||||
}
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
Entity entity = this.mc.getRenderViewEntity();
|
|
||||||
EnumFacing enumfacing = entity.getHorizontalFacing();
|
|
||||||
String s = "Invalid";
|
|
||||||
switch (enumfacing) {
|
|
||||||
case NORTH:
|
|
||||||
s = "Towards negative Z";
|
|
||||||
break;
|
|
||||||
case SOUTH:
|
|
||||||
s = "Towards positive Z";
|
|
||||||
break;
|
|
||||||
case WEST:
|
|
||||||
s = "Towards negative X";
|
|
||||||
break;
|
|
||||||
case EAST:
|
|
||||||
s = "Towards positive X";
|
|
||||||
}
|
|
||||||
|
|
||||||
ArrayList arraylist = Lists.newArrayList(
|
protected List<String> call() {
|
||||||
new String[] {
|
if (!this.mc.gameSettings.showDebugInfo) {
|
||||||
"Minecraft 1.8.8 (" + this.mc.getVersion() + "/" + ClientBrandRetriever.getClientModName() + ")",
|
BlockPos blockpos = new BlockPos(this.mc.getRenderViewEntity().posX,
|
||||||
this.mc.debug,
|
this.mc.getRenderViewEntity().getEntityBoundingBox().minY, this.mc.getRenderViewEntity().posZ);
|
||||||
this.mc.renderGlobal.getDebugInfoRenders(),
|
return Lists.newArrayList(new String[] { this.mc.renderGlobal.getDebugInfoShort(),
|
||||||
this.mc.renderGlobal.getDebugInfoEntities(),
|
"x: " + blockpos.getX() + ", y: " + blockpos.getY() + ", z: " + blockpos.getZ() });
|
||||||
"P: " + this.mc.effectRenderer.getStatistics() + ". T: " + this.mc.theWorld.getDebugLoadedEntities(),
|
}
|
||||||
this.mc.theWorld.getProviderName(),
|
|
||||||
"",
|
|
||||||
HString.format("XYZ: %.3f / %.5f / %.3f", new Object[] { Double.valueOf(this.mc.getRenderViewEntity().posX), Double.valueOf(this.mc.getRenderViewEntity().getEntityBoundingBox().minY), Double.valueOf(this.mc.getRenderViewEntity().posZ) }),
|
|
||||||
HString.format("Block: %d %d %d", new Object[] { Integer.valueOf(blockpos.getX()), Integer.valueOf(blockpos.getY()), Integer.valueOf(blockpos.getZ()) }),
|
|
||||||
HString.format("Chunk: %d %d %d in %d %d %d", new Object[] { Integer.valueOf(blockpos.getX() & 15), Integer.valueOf(blockpos.getY() & 15), Integer.valueOf(blockpos.getZ() & 15), Integer.valueOf(blockpos.getX() >> 4), Integer.valueOf(blockpos.getY() >> 4), Integer.valueOf(blockpos.getZ() >> 4) }),
|
|
||||||
HString.format("Facing: %s (%s) (%.1f / %.1f)", new Object[] { enumfacing, s, Float.valueOf(MathHelper.wrapAngleTo180_float(entity.rotationYaw)), Float.valueOf(MathHelper.wrapAngleTo180_float(entity.rotationPitch)) })
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (this.mc.theWorld != null && this.mc.theWorld.isBlockLoaded(blockpos)) {
|
|
||||||
Chunk chunk = this.mc.theWorld.getChunkFromBlockCoords(blockpos);
|
|
||||||
arraylist.add("Biome: " + chunk.getBiome(blockpos).biomeName);
|
|
||||||
arraylist.add("Light: " + chunk.getLightSubtracted(blockpos, 0) + " (" + chunk.getLightFor(EnumSkyBlock.SKY, blockpos) + " sky, " + chunk.getLightFor(EnumSkyBlock.BLOCK, blockpos) + " block)");
|
|
||||||
DifficultyInstance difficultyinstance = this.mc.theWorld.getDifficultyForLocation(blockpos);
|
|
||||||
arraylist.add(HString.format("Local Difficulty: %.2f (Day %d)", new Object[] { Float.valueOf(difficultyinstance.getAdditionalDifficulty()), Long.valueOf(this.mc.theWorld.getWorldTime() / 24000L) }));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.mc.objectMouseOver != null && this.mc.objectMouseOver.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && this.mc.objectMouseOver.getBlockPos() != null) {
|
BlockPos blockpos = new BlockPos(this.mc.getRenderViewEntity().posX,
|
||||||
BlockPos blockpos1 = this.mc.objectMouseOver.getBlockPos();
|
this.mc.getRenderViewEntity().getEntityBoundingBox().minY, this.mc.getRenderViewEntity().posZ);
|
||||||
arraylist.add(HString.format("Looking at: %d %d %d", new Object[] { Integer.valueOf(blockpos1.getX()), Integer.valueOf(blockpos1.getY()), Integer.valueOf(blockpos1.getZ()) }));
|
if (this.isReducedDebug()) {
|
||||||
}
|
return Lists.newArrayList(new String[] {
|
||||||
|
"Minecraft 1.8.8 (" + this.mc.getVersion() + "/" + ClientBrandRetriever.getClientModName() + ")",
|
||||||
|
this.mc.debug, this.mc.renderGlobal.getDebugInfoRenders(),
|
||||||
|
this.mc.renderGlobal.getDebugInfoEntities(),
|
||||||
|
"P: " + this.mc.effectRenderer.getStatistics() + ". T: "
|
||||||
|
+ this.mc.theWorld.getDebugLoadedEntities(),
|
||||||
|
this.mc.theWorld.getProviderName(), "",
|
||||||
|
HString.format("Chunk-relative: %d %d %d", new Object[] { Integer.valueOf(blockpos.getX() & 15),
|
||||||
|
Integer.valueOf(blockpos.getY() & 15), Integer.valueOf(blockpos.getZ() & 15) }) });
|
||||||
|
} else {
|
||||||
|
Entity entity = this.mc.getRenderViewEntity();
|
||||||
|
EnumFacing enumfacing = entity.getHorizontalFacing();
|
||||||
|
String s = "Invalid";
|
||||||
|
switch (enumfacing) {
|
||||||
|
case NORTH:
|
||||||
|
s = "Towards negative Z";
|
||||||
|
break;
|
||||||
|
case SOUTH:
|
||||||
|
s = "Towards positive Z";
|
||||||
|
break;
|
||||||
|
case WEST:
|
||||||
|
s = "Towards negative X";
|
||||||
|
break;
|
||||||
|
case EAST:
|
||||||
|
s = "Towards positive X";
|
||||||
|
}
|
||||||
|
|
||||||
return arraylist;
|
ArrayList arraylist = Lists.newArrayList(new String[] {
|
||||||
}
|
"Minecraft 1.8.8 (" + this.mc.getVersion() + "/" + ClientBrandRetriever.getClientModName() + ")",
|
||||||
}
|
this.mc.debug, this.mc.renderGlobal.getDebugInfoRenders(),
|
||||||
|
this.mc.renderGlobal.getDebugInfoEntities(), "P: " + this.mc.effectRenderer.getStatistics()
|
||||||
|
+ ". T: " + this.mc.theWorld.getDebugLoadedEntities(),
|
||||||
|
this.mc.theWorld.getProviderName(), "",
|
||||||
|
HString.format("XYZ: %.3f / %.5f / %.3f",
|
||||||
|
new Object[] { Double.valueOf(this.mc.getRenderViewEntity().posX),
|
||||||
|
Double.valueOf(this.mc.getRenderViewEntity().getEntityBoundingBox().minY),
|
||||||
|
Double.valueOf(this.mc.getRenderViewEntity().posZ) }),
|
||||||
|
HString.format("Block: %d %d %d",
|
||||||
|
new Object[] { Integer.valueOf(blockpos.getX()), Integer.valueOf(blockpos.getY()),
|
||||||
|
Integer.valueOf(blockpos.getZ()) }),
|
||||||
|
HString.format("Chunk: %d %d %d in %d %d %d",
|
||||||
|
new Object[] { Integer.valueOf(blockpos.getX() & 15), Integer.valueOf(blockpos.getY() & 15),
|
||||||
|
Integer.valueOf(blockpos.getZ() & 15), Integer.valueOf(blockpos.getX() >> 4),
|
||||||
|
Integer.valueOf(blockpos.getY() >> 4), Integer.valueOf(blockpos.getZ() >> 4) }),
|
||||||
|
HString.format("Facing: %s (%s) (%.1f / %.1f)",
|
||||||
|
new Object[] { enumfacing, s,
|
||||||
|
Float.valueOf(MathHelper.wrapAngleTo180_float(entity.rotationYaw)),
|
||||||
|
Float.valueOf(MathHelper.wrapAngleTo180_float(entity.rotationPitch)) }) });
|
||||||
|
if (this.mc.theWorld != null && this.mc.theWorld.isBlockLoaded(blockpos)) {
|
||||||
|
Chunk chunk = this.mc.theWorld.getChunkFromBlockCoords(blockpos);
|
||||||
|
arraylist.add("Biome: " + chunk.getBiome(blockpos).biomeName);
|
||||||
|
arraylist.add("Light: " + chunk.getLightSubtracted(blockpos, 0) + " ("
|
||||||
|
+ chunk.getLightFor(EnumSkyBlock.SKY, blockpos) + " sky, "
|
||||||
|
+ chunk.getLightFor(EnumSkyBlock.BLOCK, blockpos) + " block)");
|
||||||
|
DifficultyInstance difficultyinstance = this.mc.theWorld.getDifficultyForLocation(blockpos);
|
||||||
|
arraylist.add(HString.format("Local Difficulty: %.2f (Day %d)",
|
||||||
|
new Object[] { Float.valueOf(difficultyinstance.getAdditionalDifficulty()),
|
||||||
|
Long.valueOf(this.mc.theWorld.getWorldTime() / 24000L) }));
|
||||||
|
}
|
||||||
|
|
||||||
protected List<String> getDebugInfoRight() {
|
if (this.mc.objectMouseOver != null
|
||||||
ArrayList arraylist;
|
&& this.mc.objectMouseOver.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK
|
||||||
if (EagRuntime.getPlatformType() != EnumPlatformType.JAVASCRIPT) {
|
&& this.mc.objectMouseOver.getBlockPos() != null) {
|
||||||
long i = EagRuntime.maxMemory();
|
BlockPos blockpos1 = this.mc.objectMouseOver.getBlockPos();
|
||||||
long j = EagRuntime.totalMemory();
|
arraylist.add(HString.format("Looking at: %d %d %d", new Object[] { Integer.valueOf(blockpos1.getX()),
|
||||||
long k = EagRuntime.freeMemory();
|
Integer.valueOf(blockpos1.getY()), Integer.valueOf(blockpos1.getZ()) }));
|
||||||
long l = j - k;
|
}
|
||||||
arraylist =
|
|
||||||
Lists.newArrayList(
|
|
||||||
new String[] {
|
|
||||||
HString.format("Java: %s %dbit", new Object[] { System.getProperty("java.version"), Integer.valueOf(this.mc.isJava64bit() ? 64 : 32) }),
|
|
||||||
HString.format("Mem: % 2d%% %03d/%03dMB", new Object[] { Long.valueOf(l * 100L / i), Long.valueOf(bytesToMb(l)), Long.valueOf(bytesToMb(i)) }),
|
|
||||||
HString.format("Allocated: % 2d%% %03dMB", new Object[] { Long.valueOf(j * 100L / i), Long.valueOf(bytesToMb(j)) }),
|
|
||||||
"",
|
|
||||||
HString.format("CPU: %s", new Object[] { "eaglercraft" }),
|
|
||||||
"",
|
|
||||||
HString.format("Display: %dx%d (%s)", new Object[] { Integer.valueOf(Display.getWidth()), Integer.valueOf(Display.getHeight()), EaglercraftGPU.glGetString(7936) }),
|
|
||||||
EaglercraftGPU.glGetString(7937),
|
|
||||||
EaglercraftGPU.glGetString(7938)
|
|
||||||
}
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
arraylist = Lists.newArrayList(new String[] { "Java: TeaVM", "", HString.format("CPU: %s", new Object[] { "eaglercraft" }), "", HString.format("Display: %dx%d (%s)", new Object[] { Integer.valueOf(Display.getWidth()), Integer.valueOf(Display.getHeight()), EaglercraftGPU.glGetString(7936) }), EaglercraftGPU.glGetString(7937), EaglercraftGPU.glGetString(7938) });
|
|
||||||
}
|
|
||||||
if (this.isReducedDebug()) {
|
|
||||||
return arraylist;
|
|
||||||
} else {
|
|
||||||
if (this.mc.objectMouseOver != null && this.mc.objectMouseOver.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && this.mc.objectMouseOver.getBlockPos() != null) {
|
|
||||||
BlockPos blockpos = this.mc.objectMouseOver.getBlockPos();
|
|
||||||
IBlockState iblockstate = this.mc.theWorld.getBlockState(blockpos);
|
|
||||||
arraylist.add("");
|
|
||||||
arraylist.add(String.valueOf(Block.blockRegistry.getNameForObject(iblockstate.getBlock())));
|
|
||||||
|
|
||||||
for (Entry entry : iblockstate.getProperties().entrySet()) {
|
return arraylist;
|
||||||
String s = ((Comparable) entry.getValue()).toString();
|
}
|
||||||
if (entry.getValue() == Boolean.TRUE) {
|
}
|
||||||
s = EnumChatFormatting.GREEN + s;
|
|
||||||
} else if (entry.getValue() == Boolean.FALSE) {
|
|
||||||
s = EnumChatFormatting.RED + s;
|
|
||||||
}
|
|
||||||
|
|
||||||
arraylist.add(((IProperty) entry.getKey()).getName() + ": " + s);
|
protected List<String> getDebugInfoRight() {
|
||||||
}
|
ArrayList arraylist;
|
||||||
}
|
if (EagRuntime.getPlatformType() != EnumPlatformType.JAVASCRIPT) {
|
||||||
|
long i = EagRuntime.maxMemory();
|
||||||
|
long j = EagRuntime.totalMemory();
|
||||||
|
long k = EagRuntime.freeMemory();
|
||||||
|
long l = j - k;
|
||||||
|
arraylist = Lists.newArrayList(new String[] {
|
||||||
|
HString.format("Java: %s %dbit",
|
||||||
|
new Object[] { System.getProperty("java.version"),
|
||||||
|
Integer.valueOf(this.mc.isJava64bit() ? 64 : 32) }),
|
||||||
|
HString.format("Mem: % 2d%% %03d/%03dMB",
|
||||||
|
new Object[] { Long.valueOf(l * 100L / i), Long.valueOf(bytesToMb(l)),
|
||||||
|
Long.valueOf(bytesToMb(i)) }),
|
||||||
|
HString.format("Allocated: % 2d%% %03dMB",
|
||||||
|
new Object[] { Long.valueOf(j * 100L / i), Long.valueOf(bytesToMb(j)) }),
|
||||||
|
"", HString.format("CPU: %s", new Object[] { "eaglercraft" }), "",
|
||||||
|
HString.format("Display: %dx%d (%s)",
|
||||||
|
new Object[] { Integer.valueOf(Display.getWidth()), Integer.valueOf(Display.getHeight()),
|
||||||
|
EaglercraftGPU.glGetString(7936) }),
|
||||||
|
EaglercraftGPU.glGetString(7937), EaglercraftGPU.glGetString(7938) });
|
||||||
|
} else {
|
||||||
|
arraylist = Lists.newArrayList(
|
||||||
|
new String[] { "Java: TeaVM", "", HString.format("CPU: %s", new Object[] { "eaglercraft" }), "",
|
||||||
|
HString.format("Display: %dx%d (%s)",
|
||||||
|
new Object[] { Integer.valueOf(Display.getWidth()),
|
||||||
|
Integer.valueOf(Display.getHeight()), EaglercraftGPU.glGetString(7936) }),
|
||||||
|
EaglercraftGPU.glGetString(7937), EaglercraftGPU.glGetString(7938) });
|
||||||
|
}
|
||||||
|
if (this.isReducedDebug()) {
|
||||||
|
return arraylist;
|
||||||
|
} else {
|
||||||
|
if (this.mc.objectMouseOver != null
|
||||||
|
&& this.mc.objectMouseOver.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK
|
||||||
|
&& this.mc.objectMouseOver.getBlockPos() != null) {
|
||||||
|
BlockPos blockpos = this.mc.objectMouseOver.getBlockPos();
|
||||||
|
IBlockState iblockstate = this.mc.theWorld.getBlockState(blockpos);
|
||||||
|
arraylist.add("");
|
||||||
|
arraylist.add(String.valueOf(Block.blockRegistry.getNameForObject(iblockstate.getBlock())));
|
||||||
|
|
||||||
return arraylist;
|
for (Entry entry : iblockstate.getProperties().entrySet()) {
|
||||||
}
|
String s = ((Comparable) entry.getValue()).toString();
|
||||||
}
|
if (entry.getValue() == Boolean.TRUE) {
|
||||||
|
s = EnumChatFormatting.GREEN + s;
|
||||||
|
} else if (entry.getValue() == Boolean.FALSE) {
|
||||||
|
s = EnumChatFormatting.RED + s;
|
||||||
|
}
|
||||||
|
|
||||||
private void func_181554_e() {
|
arraylist.add(((IProperty) entry.getKey()).getName() + ": " + s);
|
||||||
GlStateManager.disableDepth();
|
}
|
||||||
FrameTimer frametimer = this.mc.func_181539_aj();
|
}
|
||||||
int i = frametimer.func_181749_a();
|
|
||||||
int j = frametimer.func_181750_b();
|
|
||||||
long[] along = frametimer.func_181746_c();
|
|
||||||
ScaledResolution scaledresolution = new ScaledResolution(this.mc);
|
|
||||||
int k = i;
|
|
||||||
int l = 0;
|
|
||||||
drawRect(0, scaledresolution.getScaledHeight() - 60, 240, scaledresolution.getScaledHeight(), -1873784752);
|
|
||||||
|
|
||||||
while (k != j) {
|
return arraylist;
|
||||||
int i1 = frametimer.func_181748_a(along[k], 30);
|
}
|
||||||
int j1 = this.func_181552_c(MathHelper.clamp_int(i1, 0, 60), 0, 30, 60);
|
}
|
||||||
this.drawVerticalLine(l, scaledresolution.getScaledHeight(), scaledresolution.getScaledHeight() - i1, j1);
|
|
||||||
++l;
|
|
||||||
k = frametimer.func_181751_b(k + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
drawRect(1, scaledresolution.getScaledHeight() - 30 + 1, 14, scaledresolution.getScaledHeight() - 30 + 10, -1873784752);
|
private void func_181554_e() {
|
||||||
this.fontRenderer.drawString("60", 2, scaledresolution.getScaledHeight() - 30 + 2, 14737632);
|
GlStateManager.disableDepth();
|
||||||
this.drawHorizontalLine(0, 239, scaledresolution.getScaledHeight() - 30, -1);
|
FrameTimer frametimer = this.mc.func_181539_aj();
|
||||||
drawRect(1, scaledresolution.getScaledHeight() - 60 + 1, 14, scaledresolution.getScaledHeight() - 60 + 10, -1873784752);
|
int i = frametimer.func_181749_a();
|
||||||
this.fontRenderer.drawString("30", 2, scaledresolution.getScaledHeight() - 60 + 2, 14737632);
|
int j = frametimer.func_181750_b();
|
||||||
this.drawHorizontalLine(0, 239, scaledresolution.getScaledHeight() - 60, -1);
|
long[] along = frametimer.func_181746_c();
|
||||||
this.drawHorizontalLine(0, 239, scaledresolution.getScaledHeight() - 1, -1);
|
ScaledResolution scaledresolution = new ScaledResolution(this.mc);
|
||||||
this.drawVerticalLine(0, scaledresolution.getScaledHeight() - 60, scaledresolution.getScaledHeight(), -1);
|
int k = i;
|
||||||
this.drawVerticalLine(239, scaledresolution.getScaledHeight() - 60, scaledresolution.getScaledHeight(), -1);
|
int l = 0;
|
||||||
if (this.mc.gameSettings.limitFramerate <= 120) {
|
drawRect(0, scaledresolution.getScaledHeight() - 60, 240, scaledresolution.getScaledHeight(), -1873784752);
|
||||||
this.drawHorizontalLine(0, 239, scaledresolution.getScaledHeight() - 60 + this.mc.gameSettings.limitFramerate / 2, -16711681);
|
|
||||||
}
|
|
||||||
|
|
||||||
GlStateManager.enableDepth();
|
while (k != j) {
|
||||||
}
|
int i1 = frametimer.func_181748_a(along[k], 30);
|
||||||
|
int j1 = this.func_181552_c(MathHelper.clamp_int(i1, 0, 60), 0, 30, 60);
|
||||||
|
this.drawVerticalLine(l, scaledresolution.getScaledHeight(), scaledresolution.getScaledHeight() - i1, j1);
|
||||||
|
++l;
|
||||||
|
k = frametimer.func_181751_b(k + 1);
|
||||||
|
}
|
||||||
|
|
||||||
private int func_181552_c(int parInt1, int parInt2, int parInt3, int parInt4) {
|
drawRect(1, scaledresolution.getScaledHeight() - 30 + 1, 14, scaledresolution.getScaledHeight() - 30 + 10,
|
||||||
return parInt1 < parInt3 ? this.func_181553_a(-16711936, -256, (float) parInt1 / (float) parInt3) : this.func_181553_a(-256, -65536, (float) (parInt1 - parInt3) / (float) (parInt4 - parInt3));
|
-1873784752);
|
||||||
}
|
this.fontRenderer.drawString("60", 2, scaledresolution.getScaledHeight() - 30 + 2, 14737632);
|
||||||
|
this.drawHorizontalLine(0, 239, scaledresolution.getScaledHeight() - 30, -1);
|
||||||
|
drawRect(1, scaledresolution.getScaledHeight() - 60 + 1, 14, scaledresolution.getScaledHeight() - 60 + 10,
|
||||||
|
-1873784752);
|
||||||
|
this.fontRenderer.drawString("30", 2, scaledresolution.getScaledHeight() - 60 + 2, 14737632);
|
||||||
|
this.drawHorizontalLine(0, 239, scaledresolution.getScaledHeight() - 60, -1);
|
||||||
|
this.drawHorizontalLine(0, 239, scaledresolution.getScaledHeight() - 1, -1);
|
||||||
|
this.drawVerticalLine(0, scaledresolution.getScaledHeight() - 60, scaledresolution.getScaledHeight(), -1);
|
||||||
|
this.drawVerticalLine(239, scaledresolution.getScaledHeight() - 60, scaledresolution.getScaledHeight(), -1);
|
||||||
|
if (this.mc.gameSettings.limitFramerate <= 120) {
|
||||||
|
this.drawHorizontalLine(0, 239,
|
||||||
|
scaledresolution.getScaledHeight() - 60 + this.mc.gameSettings.limitFramerate / 2, -16711681);
|
||||||
|
}
|
||||||
|
|
||||||
private int func_181553_a(int parInt1, int parInt2, float parFloat1) {
|
GlStateManager.enableDepth();
|
||||||
int i = parInt1 >> 24 & 255;
|
}
|
||||||
int j = parInt1 >> 16 & 255;
|
|
||||||
int k = parInt1 >> 8 & 255;
|
|
||||||
int l = parInt1 & 255;
|
|
||||||
int i1 = parInt2 >> 24 & 255;
|
|
||||||
int j1 = parInt2 >> 16 & 255;
|
|
||||||
int k1 = parInt2 >> 8 & 255;
|
|
||||||
int l1 = parInt2 & 255;
|
|
||||||
int i2 = MathHelper.clamp_int((int) ((float) i + (float) (i1 - i) * parFloat1), 0, 255);
|
|
||||||
int j2 = MathHelper.clamp_int((int) ((float) j + (float) (j1 - j) * parFloat1), 0, 255);
|
|
||||||
int k2 = MathHelper.clamp_int((int) ((float) k + (float) (k1 - k) * parFloat1), 0, 255);
|
|
||||||
int l2 = MathHelper.clamp_int((int) ((float) l + (float) (l1 - l) * parFloat1), 0, 255);
|
|
||||||
return i2 << 24 | j2 << 16 | k2 << 8 | l2;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static long bytesToMb(long bytes) {
|
private int func_181552_c(int parInt1, int parInt2, int parInt3, int parInt4) {
|
||||||
return bytes / 1024L / 1024L;
|
return parInt1 < parInt3 ? this.func_181553_a(-16711936, -256, (float) parInt1 / (float) parInt3)
|
||||||
}
|
: this.func_181553_a(-256, -65536, (float) (parInt1 - parInt3) / (float) (parInt4 - parInt3));
|
||||||
|
}
|
||||||
|
|
||||||
|
private int func_181553_a(int parInt1, int parInt2, float parFloat1) {
|
||||||
|
int i = parInt1 >> 24 & 255;
|
||||||
|
int j = parInt1 >> 16 & 255;
|
||||||
|
int k = parInt1 >> 8 & 255;
|
||||||
|
int l = parInt1 & 255;
|
||||||
|
int i1 = parInt2 >> 24 & 255;
|
||||||
|
int j1 = parInt2 >> 16 & 255;
|
||||||
|
int k1 = parInt2 >> 8 & 255;
|
||||||
|
int l1 = parInt2 & 255;
|
||||||
|
int i2 = MathHelper.clamp_int((int) ((float) i + (float) (i1 - i) * parFloat1), 0, 255);
|
||||||
|
int j2 = MathHelper.clamp_int((int) ((float) j + (float) (j1 - j) * parFloat1), 0, 255);
|
||||||
|
int k2 = MathHelper.clamp_int((int) ((float) k + (float) (k1 - k) * parFloat1), 0, 255);
|
||||||
|
int l2 = MathHelper.clamp_int((int) ((float) l + (float) (l1 - l) * parFloat1), 0, 255);
|
||||||
|
return i2 << 24 | j2 << 16 | k2 << 8 | l2;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static long bytesToMb(long bytes) {
|
||||||
|
return bytes / 1024L / 1024L;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -546,7 +546,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.hurtCameraEffect(partialTicks);
|
this.hurtCameraEffect(partialTicks);
|
||||||
if (this.mc.gameSettings.viewBobbing) {
|
if (this.mc.gameSettings.viewBobbing && !ModManager.minimalViewBobbing.isEnabled()) {
|
||||||
this.setupViewBobbing(partialTicks);
|
this.setupViewBobbing(partialTicks);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user