Skip to content

Commit

Permalink
4
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbudda committed Aug 3, 2016
1 parent a2cd9f2 commit 82db47f
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
releases/
*zip
*.class
*install*.jar
*-install*.jar
*install*.exe
patches/Start.java.patch
installer/out/
Expand Down
59 changes: 30 additions & 29 deletions patches/net/minecraft/client/gui/GuiIngame.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
private static final String __OBFID = "CL_00000661";

public GuiIngame(Minecraft p_i46379_1_)
@@ -78,21 +88,48 @@
@@ -78,21 +88,49 @@
this.streamIndicator = new GuiStreamIndicator(this.mc);
}

Expand All @@ -108,6 +108,7 @@
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glEnable(GL11.GL_DEPTH_TEST);
+ GL11.glEnable(GL11.GL_LIGHTING);
+ GL11.glEnable(GL11.GL_ALPHA_TEST);
+
+ GL11.glColorMask(true, true, true, true); // ENABLE CHANIGNG UNDERLYING ALPHA VALUE
+ }
Expand All @@ -133,7 +134,7 @@
}
else
{
@@ -103,59 +140,77 @@
@@ -103,59 +141,77 @@

if (this.mc.gameSettings.thirdPersonView == 0 && var9 != null && var9.getItem() == Item.getItemFromBlock(Blocks.pumpkin))
{
Expand Down Expand Up @@ -242,7 +243,7 @@
GL11.glDisable(GL11.GL_BLEND);
}

@@ -175,7 +230,7 @@
@@ -175,7 +231,7 @@
}

var12 = (int)(220.0F * var33) << 24 | 1052704;
Expand All @@ -251,7 +252,7 @@
GL11.glEnable(GL11.GL_ALPHA_TEST);
GL11.glEnable(GL11.GL_DEPTH_TEST);
this.mc.mcProfiler.endSection();
@@ -183,7 +238,7 @@
@@ -183,7 +239,7 @@

var32 = 16777215;
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
Expand All @@ -260,7 +261,7 @@
int var14;
int var15;
int var16;
@@ -198,7 +253,7 @@
@@ -198,7 +254,7 @@
var34 = this.mc.thePlayer.getHorseJumpPower();
var38 = 182;
var14 = (int)(var34 * (float)(var38 + 1));
Expand All @@ -269,7 +270,7 @@
this.drawTexturedModalRect(var11, var15, 0, 84, var38, 5);

if (var14 > 0)
@@ -218,7 +273,7 @@
@@ -218,7 +274,7 @@
{
var38 = 182;
var14 = (int)(this.mc.thePlayer.experience * (float)(var38 + 1));
Expand All @@ -278,7 +279,7 @@
this.drawTexturedModalRect(var11, var15, 0, 64, var38, 5);

if (var14 > 0)
@@ -235,8 +290,8 @@
@@ -235,8 +291,8 @@
boolean var39 = false;
var14 = var39 ? 16777215 : 8453920;
String var43 = "" + this.mc.thePlayer.experienceLevel;
Expand All @@ -289,7 +290,7 @@
boolean var18 = false;
var8.drawString(var43, var16 + 1, var17, 0);
var8.drawString(var43, var16 - 1, var17, 0);
@@ -256,8 +311,8 @@
@@ -256,8 +312,8 @@
if (this.remainingHighlightTicks > 0 && this.highlightingItemStack != null)
{
var35 = this.highlightingItemStack.getDisplayName();
Expand All @@ -300,7 +301,7 @@

if (!this.mc.playerController.shouldDrawHUD())
{
@@ -300,7 +355,7 @@
@@ -300,7 +356,7 @@
}

var13 = var8.getStringWidth(var35);
Expand All @@ -309,7 +310,7 @@
this.mc.mcProfiler.endSection();
}

@@ -312,26 +367,44 @@
@@ -312,26 +368,44 @@
{
this.mc.mcProfiler.startSection("debug");
GL11.glPushMatrix();
Expand Down Expand Up @@ -364,7 +365,7 @@
int var25 = MathHelper.floor_double((double)(this.mc.thePlayer.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
this.drawString(var8, "f: " + var25 + " (" + Direction.directions[var25] + ") / " + MathHelper.wrapAngleTo180_float(this.mc.thePlayer.rotationYaw), 2, 88, 14737632);

@@ -347,11 +420,29 @@
@@ -347,11 +421,29 @@
{
this.drawString(var8, String.format("shader: %s", new Object[] {this.mc.entityRenderer.getShaderGroup().getShaderGroupName()}), 2, 112, 14737632);
}
Expand Down Expand Up @@ -395,7 +396,7 @@
if (this.recordPlayingUpFor > 0)
{
this.mc.mcProfiler.startSection("overlayMessage");
@@ -366,7 +457,7 @@
@@ -366,7 +458,7 @@
if (var13 > 8)
{
GL11.glPushMatrix();
Expand All @@ -404,7 +405,7 @@
GL11.glEnable(GL11.GL_BLEND);
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
var14 = 16777215;
@@ -388,14 +479,14 @@
@@ -388,14 +480,14 @@

if (var37 != null)
{
Expand All @@ -421,7 +422,7 @@
this.mc.mcProfiler.startSection("chat");
this.persistantChatGUI.drawChat(this.updateCounter);
this.mc.mcProfiler.endSection();
@@ -422,7 +513,7 @@
@@ -422,7 +514,7 @@
var46 = 150;
}

Expand All @@ -430,7 +431,7 @@
byte var47 = 10;
drawRect(var19 - 1, var47 - 1, var19 + var46 * var17, var47 + 9 * var16, Integer.MIN_VALUE);

@@ -501,9 +592,10 @@
@@ -501,9 +593,10 @@
{
this.streamIndicator.render((int)(p_152126_1_ - 10.0F), 10);
}
Expand All @@ -444,7 +445,7 @@
Scoreboard var5 = p_96136_1_.getScoreboard();
Collection var6 = var5.getSortedScores(p_96136_1_);

@@ -549,9 +641,10 @@
@@ -549,9 +642,10 @@
}
}
}
Expand All @@ -458,7 +459,7 @@
boolean var3 = this.mc.thePlayer.hurtResistantTime / 3 % 2 == 1;

if (this.mc.thePlayer.hurtResistantTime < 10)
@@ -559,52 +652,52 @@
@@ -559,52 +653,52 @@
var3 = false;
}

Expand Down Expand Up @@ -535,7 +536,7 @@
{
this.drawTexturedModalRect(var23, var18, 16, 9, 9, 9);
}
@@ -616,7 +709,7 @@
@@ -616,7 +710,7 @@
int var26;
int var27;

Expand All @@ -544,7 +545,7 @@
{
var23 = 16;

@@ -636,16 +729,16 @@
@@ -636,16 +730,16 @@
var24 = 1;
}

Expand All @@ -565,7 +566,7 @@
{
var27 -= 2;
}
@@ -661,12 +754,12 @@
@@ -661,12 +755,12 @@

if (var3)
{
Expand All @@ -580,7 +581,7 @@
{
this.drawTexturedModalRect(var26, var27, var23 + 63, 9 * var28, 9, 9);
}
@@ -674,7 +767,7 @@
@@ -674,7 +768,7 @@

if (var19 > 0.0F)
{
Expand All @@ -589,7 +590,7 @@
{
this.drawTexturedModalRect(var26, var27, var23 + 153, 9 * var28, 9, 9);
}
@@ -687,22 +780,22 @@
@@ -687,22 +781,22 @@
}
else
{
Expand All @@ -616,7 +617,7 @@
{
this.mc.mcProfiler.endStartSection("food");

@@ -718,7 +811,7 @@
@@ -718,7 +812,7 @@
var38 = 13;
}

Expand All @@ -625,7 +626,7 @@
{
var36 = var13 + (this.rand.nextInt(3) - 1);
}
@@ -733,32 +826,32 @@
@@ -733,32 +827,32 @@

if (var6)
{
Expand Down Expand Up @@ -664,7 +665,7 @@
var36 = (int)Math.ceil((double)var35.getHealth());
float var37 = var35.getMaxHealth();
var26 = (int)(var37 + 0.5F) / 2;
@@ -830,7 +923,9 @@
@@ -830,7 +924,9 @@
/**
* Renders dragon's (boss) health on the HUD
*/
Expand All @@ -675,7 +676,7 @@
{
if (BossStatus.bossName != null && BossStatus.statusBarTime > 0)
{
@@ -856,9 +951,15 @@
@@ -856,9 +952,15 @@
this.mc.getTextureManager().bindTexture(icons);
}
}
Expand All @@ -693,7 +694,7 @@
GL11.glDisable(GL11.GL_DEPTH_TEST);
GL11.glDepthMask(false);
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
@@ -881,8 +982,15 @@
@@ -881,8 +983,15 @@
/**
* Renders the vignette. Args: vignetteBrightness, width, height
*/
Expand All @@ -710,7 +711,7 @@
p_73829_1_ = 1.0F - p_73829_1_;

if (p_73829_1_ < 0.0F)
@@ -913,44 +1021,22 @@
@@ -913,44 +1022,22 @@
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
}
Expand Down Expand Up @@ -765,7 +766,7 @@
{
ItemStack var5 = this.mc.thePlayer.inventory.mainInventory[p_73832_1_];

@@ -1039,4 +1125,23 @@
@@ -1039,4 +1126,23 @@
{
return this.updateCounter;
}
Expand Down
28 changes: 15 additions & 13 deletions patches/net/minecraft/client/gui/GuiScreen.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import net.minecraft.util.EnumChatFormatting;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
@@ -44,13 +49,20 @@
@@ -44,13 +49,22 @@
public boolean allowUserInput;

/** The FontRenderer used by GuiScreen */
Expand All @@ -36,10 +36,12 @@
+
+ public boolean pressShiftFake;
+
+ public int mouseX, mouseY;
+
/**
* Incremented when the game is in touchscreen mode and the screen is tapped, decremented if the screen isn't
* tapped. Does not appear to be used.
@@ -84,6 +96,10 @@
@@ -84,6 +98,10 @@
{
if (keyCode == 1)
{
Expand All @@ -50,7 +52,7 @@
this.mc.displayGuiScreen((GuiScreen)null);
this.mc.setIngameFocus();
}
@@ -142,21 +158,37 @@
@@ -142,21 +160,37 @@
var4.set(var5, EnumChatFormatting.GRAY + (String)var4.get(var5));
}
}
Expand Down Expand Up @@ -92,7 +94,7 @@
if (!textLines.isEmpty())
{
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
@@ -169,7 +201,9 @@
@@ -169,7 +203,9 @@
while (var5.hasNext())
{
String var6 = (String)var5.next();
Expand All @@ -103,7 +105,7 @@

if (var7 > var4)
{
@@ -214,7 +248,9 @@
@@ -214,7 +250,9 @@
for (int var12 = 0; var12 < textLines.size(); ++var12)
{
String var13 = (String)textLines.get(var12);
Expand All @@ -114,7 +116,7 @@

if (var12 == 0)
{
@@ -246,10 +282,26 @@
@@ -246,10 +284,26 @@

if (var5.mousePressed(this.mc, mouseX, mouseY))
{
Expand Down Expand Up @@ -145,7 +147,7 @@
}
}
}
@@ -285,8 +337,22 @@
@@ -285,8 +339,22 @@
this.fontRendererObj = mc.fontRendererObj;
this.width = width;
this.height = height;
Expand All @@ -170,7 +172,7 @@
}

/**
@@ -302,7 +368,14 @@
@@ -302,7 +370,14 @@
if (Mouse.isCreated())
{
while (Mouse.next())
Expand All @@ -186,7 +188,7 @@
this.handleMouseInput();
}
}
@@ -321,9 +394,23 @@
@@ -321,9 +396,23 @@
*/
public void handleMouseInput()
{
Expand All @@ -205,14 +207,14 @@
+ mouseOffsetX = -1;
+ mouseOffsetY = -1;
+
+ int var1 = getMouseX();
+ int var2 = getMouseY();
+ int var1 =mouseX = getMouseX();
+ int var2 = mouseY= getMouseY();
int var3 = Mouse.getEventButton();
+ /** END MINECRIFT */

if (Mouse.getEventButtonState())
{
@@ -388,8 +475,17 @@
@@ -388,8 +477,17 @@
{
if (this.mc.theWorld != null)
{
Expand All @@ -230,7 +232,7 @@
else
{
this.drawBackground(tint);
@@ -441,4 +537,82 @@
@@ -441,4 +539,82 @@
{
return Keyboard.isKeyDown(42) || Keyboard.isKeyDown(54);
}
Expand Down
Loading

0 comments on commit 82db47f

Please sign in to comment.