Port to newest ver.

This commit is contained in:
UnknownUser1789 2023-01-19 00:23:31 +00:00
parent 41505bc538
commit e6baaedb99
13 changed files with 2278633 additions and 96586 deletions

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
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
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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -6,6 +6,7 @@ import java.util.List;
import dev.resent.module.base.Category;
import dev.resent.module.base.RenderModule;
import dev.resent.setting.BooleanSetting;
import dev.resent.util.misc.FuncUtils;
import net.lax1dude.eaglercraft.v1_8.Keyboard;
public class CPS extends RenderModule {
@ -25,7 +26,7 @@ public class CPS extends RenderModule {
public BooleanSetting tshadow = new BooleanSetting("Text shadow", "", true);
public int getWidth() {
return mc.fontRendererObj.getStringWidth("[00 CPS]") + 4;
return mc.fontRendererObj.getStringWidth("[00 | 00]") + 4;
}
public int getHeight() {
@ -63,13 +64,13 @@ public class CPS extends RenderModule {
public int getLMB() {
final long time = System.currentTimeMillis();
this.clicksLMB.removeIf(aLong -> aLong + 1000 < time);
FuncUtils.removeIf(clicksLMB, aLong -> aLong + 1000 < time);
return this.clicksLMB.size();
}
public int getRMB() {
final long time = System.currentTimeMillis();
this.clicksRMB.removeIf(aLong -> aLong + 1000 < time);
FuncUtils.removeIf(clicksRMB, aLong -> aLong + 1000 < time);
return this.clicksRMB.size();
}

View File

@ -4,7 +4,6 @@ import dev.resent.module.base.Category;
import dev.resent.module.base.RenderModule;
import dev.resent.setting.BooleanSetting;
import dev.resent.setting.ModeSetting;
import dev.resent.util.misc.CPSUtils;
import dev.resent.util.render.RainbowUtil;
import dev.resent.util.render.RenderUtils;
import net.lax1dude.eaglercraft.v1_8.Keyboard;

View File

@ -1,18 +1,15 @@
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_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_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_PROJECTION;
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.InputStream;
import java.text.DecimalFormat;
@ -21,6 +18,14 @@ import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
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.EagRuntime;
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.WorldProviderHell;
import net.minecraft.world.WorldSettings;
import org.apache.commons.lang3.Validate;
/**+
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.

View File

@ -1,17 +1,30 @@
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.Collection;
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.collect.Iterables;
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.OpenGlHelper;
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 final EaglercraftRandom rand = new EaglercraftRandom();
private final Minecraft mc;
private final RenderItem itemRenderer;
public static RenderItem itemRenderer;
private final GuiNewChat persistantChatGUI;
private int updateCounter;
/**+
@ -111,7 +124,7 @@ public class GuiIngame extends Gui {
public GuiIngame(Minecraft mcIn) {
this.mc = mcIn;
this.itemRenderer = mcIn.getRenderItem();
itemRenderer = mcIn.getRenderItem();
this.overlayDebug = new GuiOverlayDebug(mcIn);
this.spectatorGui = new GuiSpectator(mcIn);
this.persistantChatGUI = new GuiNewChat(mcIn);
@ -277,7 +290,7 @@ public class GuiIngame extends Gui {
ScoreObjective scoreobjective1 = scoreobjective != null ? scoreobjective
: scoreboard.getObjectiveInDisplaySlot(1);
if (scoreobjective1 != null) {
if (scoreobjective1 != null && W.scoreboard().isEnabled()) {
this.renderScoreboard(scoreobjective1, scaledresolution);
}
@ -302,6 +315,14 @@ public class GuiIngame extends Gui {
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.disableLighting();
GlStateManager.enableAlpha();
@ -314,10 +335,18 @@ public class GuiIngame extends Gui {
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(GL_ONE_MINUS_DST_COLOR, GL_ONE_MINUS_SRC_COLOR, 1, 0);
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);
}
}
public SimpleAnimation simpleAnimation = new SimpleAnimation(0.0F);
protected void renderTooltip(ScaledResolution sr, float partialTicks) {
if (this.mc.getRenderViewEntity() instanceof EntityPlayer) {
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
@ -326,9 +355,19 @@ public class GuiIngame extends Gui {
int i = sr.getScaledWidth() / 2;
float f = this.zLevel;
this.zLevel = -90.0F;
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);
}else {
drawRect(itemX, sr.getScaledHeight() - 21, itemX + 24, sr.getScaledHeight(), new Color(230, 230, 230, 180).getRGB());
}
this.zLevel = f;
GlStateManager.enableRescaleNormal();
GlStateManager.enableBlend();
@ -504,6 +543,7 @@ public class GuiIngame extends Gui {
int l = parScaledResolution.getScaledWidth() - b0 + 2;
drawRect(k1 - 2, k, l, k + this.getFontRenderer().FONT_HEIGHT, 1342177280);
this.getFontRenderer().drawString(s1, k1, k, 553648127);
if (W.scoreboard().numbers.getValue())
this.getFontRenderer().drawString(s2, l - this.getFontRenderer().getStringWidth(s2), k, 553648127);
if (j == arraylist1.size()) {
String s3 = parScoreObjective.getDisplayName();
@ -881,12 +921,12 @@ public class GuiIngame extends Gui {
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) {
GlStateManager.popMatrix();
}
this.itemRenderer.renderItemOverlays(this.mc.fontRendererObj, itemstack, xPos, yPos);
itemRenderer.renderItemOverlays(this.mc.fontRendererObj, itemstack, xPos, yPos);
}
}

View File

@ -2,8 +2,6 @@ package net.minecraft.client.gui;
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.util.ArrayList;
import java.util.Calendar;
@ -12,6 +10,10 @@ import java.util.List;
import java.util.Locale;
import java.util.Map.Entry;
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.EagRuntime;
import net.lax1dude.eaglercraft.v1_8.HString;
@ -60,7 +62,6 @@ import net.minecraft.world.chunk.Chunk;
*
*/
public class GuiOverlayDebug extends Gui {
private final Minecraft mc;
private final FontRenderer fontRenderer;
@ -110,7 +111,8 @@ public class GuiOverlayDebug extends Gui {
GlStateManager.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
}
int i = this.mc.joinWorldTickCounter - 70;
if (i < 0) i = 0;
if (i < 0)
i = 0;
drawHideHUD(ww / 2, hh - 70, (10 - i) * 0xFF / 10);
if (this.mc.joinWorldTickCounter > 70) {
GlStateManager.disableBlend();
@ -127,29 +129,38 @@ public class GuiOverlayDebug extends Gui {
private void drawXYZ(int x, int y) {
Entity e = mc.getRenderViewEntity();
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) {
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())
+ EnumChatFormatting.WHITE + " Flight: "
+ (mc.thePlayer.capabilities.allowFlying
? ("" + 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()
+ EnumChatFormatting.WHITE + ", Sat: " + EnumChatFormatting.YELLOW
+ HString.format("%.1f", mc.thePlayer.getFoodStats().getSaturationLevel());
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
+ ", Health: " + EnumChatFormatting.RED + HString.format("%.1f", mc.thePlayer.getHealth());
lw = fontRenderer.getStringWidth(line);
this.fontRenderer.drawStringWithShadow(line, x - lw, y - i, 0xFFFFFF);
i += 11;
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)
+ EnumChatFormatting.WHITE + " / " + EnumChatFormatting.GREEN + xpc;
lw = fontRenderer.getStringWidth(line);
this.fontRenderer.drawStringWithShadow(line, x - lw, y - i, 0xFFFFFF);
i += 11;
@ -164,14 +175,20 @@ public class GuiOverlayDebug extends Gui {
int s = t % 60;
int j = e.getAmplifier();
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())
+ (j > 0 ? (" " + EnumChatFormatting.YELLOW + EnumChatFormatting.BOLD
+ I18n.format("potion.potency." + j) + EnumChatFormatting.RESET) : "")
+ " [" + EnumChatFormatting.YELLOW + HString.format("%02d:%02d", m, s)
+ EnumChatFormatting.RESET + "]";
} else {
line = I18n.format(e.getEffectName()) + " [" + EnumChatFormatting.YELLOW + HString.format("%02d:%02d", m, s) + EnumChatFormatting.RESET + "]";
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;
@ -209,22 +226,30 @@ public class GuiOverlayDebug extends Gui {
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 + ")";
String timeString = EnumChatFormatting.WHITE + "Day " + ((totalTicks + 30000l) / 24000l) + " ("
+ EnumChatFormatting.YELLOW
+ (this.mc.gameSettings.hud24h ? SDFTwentyFour : SDFTwelve).format(cal.getTime())
+ EnumChatFormatting.WHITE + ")";
Entity e = mc.getRenderViewEntity();
BlockPos blockpos = new BlockPos(e.posX, MathHelper.clamp_double(e.getEntityBoundingBox().minY, 0.0D, 254.0D), e.posZ);
BlockPos blockpos = new BlockPos(e.posX, MathHelper.clamp_double(e.getEntityBoundingBox().minY, 0.0D, 254.0D),
e.posZ);
BiomeGenBase biome = mc.theWorld.getBiomeGenForCoords(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;
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);
String tempString = "Temp: " + ((blockLight > 11 || temp > 0.15f) ? EnumChatFormatting.YELLOW : EnumChatFormatting.AQUA) + HString.format("%.2f", temp) + EnumChatFormatting.WHITE;
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("Biome: " + EnumChatFormatting.AQUA + biome.biomeName, x, y - 19,
@ -254,6 +279,7 @@ public class GuiOverlayDebug extends Gui {
this.fontRenderer.drawString(s, 2, l, 14737632);
}
}
}
protected void renderDebugInfoRight(ScaledResolution parScaledResolution) {
@ -270,28 +296,29 @@ public class GuiOverlayDebug extends Gui {
this.fontRenderer.drawString(s, l, i1, 14737632);
}
}
}
protected List<String> call() {
if (!this.mc.gameSettings.showDebugInfo) {
BlockPos blockpos = new BlockPos(this.mc.getRenderViewEntity().posX, this.mc.getRenderViewEntity().getEntityBoundingBox().minY, this.mc.getRenderViewEntity().posZ);
return Lists.newArrayList(new String[] { this.mc.renderGlobal.getDebugInfoShort(), "x: " + blockpos.getX() + ", y: " + blockpos.getY() + ", z: " + blockpos.getZ() });
BlockPos blockpos = new BlockPos(this.mc.getRenderViewEntity().posX,
this.mc.getRenderViewEntity().getEntityBoundingBox().minY, this.mc.getRenderViewEntity().posZ);
return Lists.newArrayList(new String[] { this.mc.renderGlobal.getDebugInfoShort(),
"x: " + blockpos.getX() + ", y: " + blockpos.getY() + ", z: " + blockpos.getZ() });
}
BlockPos blockpos = new BlockPos(this.mc.getRenderViewEntity().posX, this.mc.getRenderViewEntity().getEntityBoundingBox().minY, this.mc.getRenderViewEntity().posZ);
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[] {
return Lists.newArrayList(new String[] {
"Minecraft 1.8.8 (" + this.mc.getVersion() + "/" + ClientBrandRetriever.getClientModName() + ")",
this.mc.debug,
this.mc.renderGlobal.getDebugInfoRenders(),
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) })
}
);
"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();
@ -310,32 +337,45 @@ public class GuiOverlayDebug extends Gui {
s = "Towards positive X";
}
ArrayList arraylist = Lists.newArrayList(
new String[] {
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)) })
}
);
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)");
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) }));
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) {
if (this.mc.objectMouseOver != null
&& this.mc.objectMouseOver.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK
&& this.mc.objectMouseOver.getBlockPos() != null) {
BlockPos blockpos1 = this.mc.objectMouseOver.getBlockPos();
arraylist.add(HString.format("Looking at: %d %d %d", new Object[] { Integer.valueOf(blockpos1.getX()), Integer.valueOf(blockpos1.getY()), Integer.valueOf(blockpos1.getZ()) }));
arraylist.add(HString.format("Looking at: %d %d %d", new Object[] { Integer.valueOf(blockpos1.getX()),
Integer.valueOf(blockpos1.getY()), Integer.valueOf(blockpos1.getZ()) }));
}
return arraylist;
@ -349,27 +389,34 @@ public class GuiOverlayDebug extends Gui {
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)
}
);
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) });
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) {
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("");
@ -410,24 +457,28 @@ public class GuiOverlayDebug extends Gui {
k = frametimer.func_181751_b(k + 1);
}
drawRect(1, scaledresolution.getScaledHeight() - 30 + 1, 14, scaledresolution.getScaledHeight() - 30 + 10, -1873784752);
drawRect(1, scaledresolution.getScaledHeight() - 30 + 1, 14, scaledresolution.getScaledHeight() - 30 + 10,
-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);
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);
this.drawHorizontalLine(0, 239,
scaledresolution.getScaledHeight() - 60 + this.mc.gameSettings.limitFramerate / 2, -16711681);
}
GlStateManager.enableDepth();
}
private int func_181552_c(int parInt1, int parInt2, int parInt3, int parInt4) {
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));
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) {

View File

@ -546,7 +546,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
}
this.hurtCameraEffect(partialTicks);
if (this.mc.gameSettings.viewBobbing) {
if (this.mc.gameSettings.viewBobbing && !ModManager.minimalViewBobbing.isEnabled()) {
this.setupViewBobbing(partialTicks);
}