Skip to content

Commit

Permalink
v9
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbudda committed May 7, 2017
1 parent 7c46aec commit c9f7a94
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 21 deletions.
2 changes: 1 addition & 1 deletion minecriftversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
of_json_name = "1.10.2_HD_U_D8"
of_file_md5 = "d2a99a8d96d1067cb9e384bbdc560c70"
minecrift_version_num = "1.10.2"
minecrift_build = "Vivecraft-jrbudda-9pre"
minecrift_build = "Vivecraft-jrbudda-9"
of_file_extension = ".jar"
mcp_version = "mcp931"
mcp_uses_generics = True
Expand Down
2 changes: 1 addition & 1 deletion patches/net/minecraft/client/Minecraft.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@
+ * The minecriftVerString will be automatically updated by the build scripts, do not modify here.
+ * Modify minecriftversion.py in root minecrift dir.
+ */
+ public final String minecriftVerString = "Vivecraft 1.10.2 Vivecraft-jrbudda-9pre";
+ public final String minecriftVerString = "Vivecraft 1.10.2 Vivecraft-jrbudda-9";
+ /* end version */
+ /** END MINECRIFT */
+
Expand Down
31 changes: 16 additions & 15 deletions patches/net/minecraft/client/gui/GuiScreen.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,14 @@
{
GlStateManager.disableRescaleNormal();
RenderHelper.disableStandardItemLighting();
@@ -470,10 +503,17 @@
@@ -470,10 +503,18 @@

public void sendChatMessage(String msg, boolean addToChat)
{
+ if (Reflector.forgeExists())
+ msg = Reflector.callString(Reflector.ForgeEventFactory_onClientSendMessage, msg);
+ if (msg.isEmpty()) return;
+ if (Reflector.ForgeEventFactory_onClientSendMessage.exists()){ //I don't think this is a thing in 1.10
+ msg = Reflector.callString(Reflector.ForgeEventFactory_onClientSendMessage, msg);
+ if (msg == null || msg.isEmpty()) return;
+ }
if (addToChat)
{
this.mc.ingameGUI.getChatGUI().addToSentMessages(msg);
Expand All @@ -142,7 +143,7 @@

this.mc.player.sendChatMessage(msg);
}
@@ -491,9 +531,19 @@
@@ -491,9 +532,19 @@

if (guibutton.mousePressed(this.mc, mouseX, mouseY))
{
Expand All @@ -162,7 +163,7 @@
}
}
}
@@ -537,8 +587,11 @@
@@ -537,8 +588,11 @@
this.fontRendererObj = mc.fontRendererObj;
this.width = width;
this.height = height;
Expand All @@ -176,7 +177,7 @@
}

/**
@@ -567,7 +620,22 @@
@@ -567,7 +621,22 @@
{
while (Mouse.next())
{
Expand All @@ -199,7 +200,7 @@
}
}

@@ -575,7 +643,10 @@
@@ -575,7 +644,10 @@
{
while (Keyboard.next())
{
Expand All @@ -210,7 +211,7 @@
}
}
}
@@ -589,6 +660,15 @@
@@ -589,6 +661,15 @@
int j = this.height - Mouse.getEventY() * this.height / this.mc.displayHeight - 1;
int k = Mouse.getEventButton();

Expand All @@ -226,7 +227,7 @@
if (Mouse.getEventButtonState())
{
if (this.mc.gameSettings.touchscreen && this.touchValue++ > 0)
@@ -622,13 +702,20 @@
@@ -622,13 +703,20 @@
*/
public void handleKeyboardInput() throws IOException
{
Expand All @@ -248,7 +249,7 @@
this.mc.dispatchKeypresses();
}

@@ -652,13 +739,23 @@
@@ -652,13 +740,23 @@
public void drawDefaultBackground()
{
this.drawWorldBackground(0);
Expand All @@ -273,7 +274,7 @@
}
else
{
@@ -736,7 +833,7 @@
@@ -736,7 +834,7 @@
*/
public static boolean isShiftKeyDown()
{
Expand All @@ -282,7 +283,7 @@
}

/**
@@ -774,4 +871,75 @@
@@ -774,4 +872,75 @@
{
this.setWorldAndResolution(mcIn, w, h);
}
Expand Down Expand Up @@ -344,13 +345,13 @@
+ this.mouseClickMove(guiX, guiY, this.eventButton, var3);
+ }
+
+ public int getMouseX()
+ public int getMouseXPos()
+ {
+ int mX = Mouse.getX() * this.mc.currentScreen.width / this.mc.displayWidth;
+ return mX;
+ }
+
+ public int getMouseY()
+ public int getMouseYPos()
+ {
+ int mY = this.mc.currentScreen.height - Mouse.getY() * this.mc.currentScreen.height / this.mc.displayHeight - 1;
+ return mY;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3686,8 +3686,8 @@
+
+ if (this.mc.currentScreen != null /*&& !this.blankGUIUntilWorldValid*/)
+ {
+ final int mouseX1 = mouseX = this.mc.currentScreen.getMouseX();
+ final int mouseY1 = mouseY = this.mc.currentScreen.getMouseY();
+ final int mouseX1 = mouseX = this.mc.currentScreen.getMouseXPos();
+ final int mouseY1 = mouseY = this.mc.currentScreen.getMouseYPos();
+
+ try
+ {
Expand All @@ -3704,9 +3704,9 @@
+ // Draw GUI crosshair
+ if (mc.stereoProvider.isStereo()){
+ if(MCOpenVR.controllerMouseValid)
+ mc.ingameGUI.drawMouseMenuQuad(mc.currentScreen.getMouseX(),mc.currentScreen.getMouseY());
+ mc.ingameGUI.drawMouseMenuQuad(mc.currentScreen.getMouseXPos(),mc.currentScreen.getMouseYPos());
+ } else
+ mc.ingameGUI.drawMouseMenuQuad(mc.currentScreen.getMouseX(),mc.currentScreen.getMouseY());
+ mc.ingameGUI.drawMouseMenuQuad(mc.currentScreen.getMouseXPos(),mc.currentScreen.getMouseYPos());
+ }
+ }
+ catch (Throwable throwable)
Expand Down

0 comments on commit c9f7a94

Please sign in to comment.