Skip to content

Commit

Permalink
foot by foot
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbudda committed Jul 20, 2016
1 parent 2e936b5 commit 6769438
Show file tree
Hide file tree
Showing 18 changed files with 1,071 additions and 300 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_C2"
of_file_md5 = "0f7c2a9b052a750aa4e3551125c7d216"
minecrift_version_num = "1.10.2"
minecrift_build = "Vivecraft-jrbudda-alpha2"
minecrift_build = "Vivecraft-jrbudda-1"
of_file_extension = ".jar"
mcp_version = "mcp931"
mcp_uses_generics = True
Expand Down
113 changes: 91 additions & 22 deletions patches/net/minecraft/client/Minecraft.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,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-alpha2";
+ public final String minecriftVerString = "ViveCraft 1.10.2 Vivecraft-jrbudda-1";
+ /* end version */
+ /** END MINECRIFT */
+
Expand Down Expand Up @@ -300,7 +300,7 @@
private MusicTicker mcMusicTicker;
private ResourceLocation mojangLogo;
private final MinecraftSessionService sessionService;
@@ -382,6 +558,22 @@
@@ -382,6 +558,23 @@

/** Profiler currently displayed in the debug screen pie chart */
private String debugProfilerName = "root";
Expand All @@ -310,6 +310,7 @@
+ private boolean sndSystemReflect;
+
+ public renderPass currentPass;
+ private boolean lastClick;
+
+
+ public enum renderPass{
Expand All @@ -323,7 +324,7 @@

public Minecraft(GameConfiguration gameConfig)
{
@@ -400,8 +592,10 @@
@@ -400,8 +593,10 @@
LOGGER.info("Setting user: {}", new Object[] {this.session.getUsername()});
LOGGER.debug("(Session ID is {})", new Object[] {this.session.getSessionID()});
this.isDemo = gameConfig.gameInfo.isDemo;
Expand All @@ -336,7 +337,7 @@
this.tempDisplayWidth = gameConfig.displayInfo.width;
this.tempDisplayHeight = gameConfig.displayInfo.height;
this.fullscreen = gameConfig.displayInfo.fullscreen;
@@ -417,6 +611,15 @@
@@ -417,6 +612,15 @@
ImageIO.setUseCache(false);
Bootstrap.register();
this.dataFixer = DataFixesManager.createFixer();
Expand All @@ -352,7 +353,7 @@
}

public void run()
@@ -492,7 +695,7 @@
@@ -492,7 +696,7 @@
/**
* Starts the game: initializes the canvas, the title, the settings, etcetera.
*/
Expand All @@ -361,15 +362,15 @@
{
this.gameSettings = new GameSettings(this, this.mcDataDir);
this.defaultResourcePacks.add(this.mcDefaultResourcePack);
@@ -508,6 +711,7 @@
@@ -508,6 +712,7 @@
this.setWindowIcon();
this.setInitialDisplayMode();
this.createDisplay();
+ Display.setTitle(this.minecriftVerString + " VR");
OpenGlHelper.initializeTextures();
this.framebufferMc = new Framebuffer(this.displayWidth, this.displayHeight, true);
this.framebufferMc.setFramebufferColor(0.0F, 0.0F, 0.0F, 0.0F);
@@ -533,6 +737,11 @@
@@ -533,6 +738,11 @@
this.fontRendererObj.setBidiFlag(this.mcLanguageManager.isCurrentLanguageBidirectional());
}

Expand All @@ -381,7 +382,7 @@
this.standardGalacticFontRenderer = new FontRenderer(this.gameSettings, new ResourceLocation("textures/font/ascii_sga.png"), this.renderEngine, false);
this.mcResourceManager.registerReloadListener(this.fontRendererObj);
this.mcResourceManager.registerReloadListener(this.standardGalacticFontRenderer);
@@ -612,7 +821,7 @@
@@ -612,7 +822,7 @@

try
{
Expand All @@ -390,7 +391,7 @@
}
catch (OpenGLException var2)
{
@@ -621,6 +830,11 @@
@@ -621,6 +831,11 @@
}

this.renderGlobal.makeEntityOutlineShader();
Expand All @@ -402,7 +403,7 @@
}

private void registerMetadataSerializers()
@@ -1015,6 +1229,13 @@
@@ -1015,6 +1230,13 @@
this.ingameGUI.getChatGUI().clearChatMessages();
}

Expand All @@ -416,7 +417,7 @@
this.currentScreen = (GuiScreen)guiScreenIn;

if (guiScreenIn != null)
@@ -1048,7 +1269,8 @@
@@ -1048,7 +1270,8 @@
/**
* Checks for an OpenGL error. If there is one, prints the error ID and error string.
*/
Expand All @@ -426,7 +427,7 @@
{
int i = GlStateManager.glGetError();

@@ -1098,128 +1320,266 @@
@@ -1098,128 +1321,266 @@
/**
* Called repeatedly from run()
*/
Expand Down Expand Up @@ -814,7 +815,7 @@

public void updateDisplay()
{
@@ -1333,7 +1693,7 @@
@@ -1333,7 +1694,7 @@
/**
* Parameter appears to be unused
*/
Expand All @@ -823,7 +824,24 @@
{
if (this.mcProfiler.profilingEnabled)
{
@@ -1576,11 +1936,11 @@
@@ -1524,10 +1885,12 @@
this.thePlayer.swingArm(EnumHand.MAIN_HAND);
}
}
- else
- {
- this.playerController.resetBlockRemoving();
- }
+
+ //VIVE SUPPORT HAND SWINING
+// else
+// {
+// this.playerController.resetBlockRemoving();
+// }
}
}

@@ -1576,11 +1939,11 @@
}

@SuppressWarnings("incomplete-switch")
Expand All @@ -837,7 +855,7 @@
{
if (!this.playerController.getIsHittingBlock())
{
@@ -1722,27 +2082,12 @@
@@ -1722,27 +2085,12 @@
*/
private void resize(int width, int height)
{
Expand Down Expand Up @@ -867,7 +885,31 @@
}

/**
@@ -2255,7 +2600,7 @@
@@ -1996,6 +2344,14 @@
this.currentScreen.handleKeyboardInput();
}

+ /** MINECRIFT */
+
+ {
+ if (VRHotkeys.handleKeyboardInputs(this))
+ continue;
+ }
+ /** END MINECRIFT */
+
boolean flag = Keyboard.getEventKeyState();

if (flag)
@@ -2012,6 +2368,8 @@
if (i == 1)
{
this.displayInGameMenu();
+ //VIVE
+ MCOpenVR.setKeyboardOverlayShowing(false, null);
}

flag1 = Keyboard.isKeyDown(61) && this.processKeyF3(i);
@@ -2255,7 +2613,7 @@

if (this.thePlayer.isHandActive())
{
Expand All @@ -876,7 +918,34 @@
{
this.playerController.onStoppedUsingItem(this.thePlayer);
}
@@ -2327,6 +2672,13 @@
@@ -2285,11 +2643,21 @@
}
else
{
- while (this.gameSettings.keyBindAttack.isPressed())
- {
- this.clickMouse();
- }
-
+ //VIVE SUPPORT HAND SWINGING
+ if (this.gameSettings.keyBindAttack.isKeyDown())
+ {
+ this.clickMouse();
+ lastClick = true;
+ } else {
+ this.leftClickCounter = 0;
+ if (lastClick)
+ {
+ this.playerController.resetBlockRemoving();
+ }
+ lastClick = false;
+ }
+ ///END VIVE
+
while (this.gameSettings.keyBindUseItem.isPressed())
{
this.rightClickMouse();
@@ -2327,6 +2695,13 @@
KeyBinding.onTick(i - 100);
}
}
Expand All @@ -890,15 +959,15 @@

long j = getSystemTime() - this.systemTime;

@@ -2381,6 +2733,7 @@
@@ -2381,6 +2756,7 @@
*/
public void launchIntegratedServer(String folderName, String worldName, @Nullable WorldSettings worldSettingsIn)
{
+ integratedServerLaunchInProgress = true;
this.loadWorld((WorldClient)null);
System.gc();
ISaveHandler isavehandler = this.saveLoader.getSaveLoader(folderName, false);
@@ -2443,7 +2796,7 @@
@@ -2443,7 +2819,7 @@
;
}
}
Expand All @@ -907,7 +976,7 @@
this.displayGuiScreen(new GuiScreenWorking());
SocketAddress socketaddress = this.theIntegratedServer.getNetworkSystem().addLocalEndpoint();
NetworkManager networkmanager = NetworkManager.provideLocalClient(socketaddress);
@@ -2458,6 +2811,9 @@
@@ -2458,6 +2834,9 @@
*/
public void loadWorld(WorldClient worldClientIn)
{
Expand All @@ -917,7 +986,7 @@
this.loadWorld(worldClientIn, "");
}

@@ -2623,7 +2979,7 @@
@@ -2623,7 +3002,7 @@
/**
* Called when user clicked he's mouse middle button (pick block)
*/
Expand All @@ -926,7 +995,7 @@
{
if (this.objectMouseOver != null && this.objectMouseOver.typeOfHit != RayTraceResult.Type.MISS)
{
@@ -3417,4 +3773,1124 @@
@@ -3417,4 +3796,1124 @@
{
return this.thePlayer != null && this.thePlayer.hasReducedDebug() || this.gameSettings.reducedDebugInfo;
}
Expand Down
9 changes: 9 additions & 0 deletions patches/net/minecraft/client/entity/EntityPlayerSP.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,15 @@
{
this.mc.getSoundHandler().playSound(new ElytraSound(this));
}
@@ -977,7 +1018,7 @@
this.sendPlayerAbilities();
}
}
- else if (!flag && this.movementInput.jump && !flag3)
+ else if (!flag && this.movementInput.jump && !flag3)
{
if (this.flyToggleTimer == 0)
{
@@ -1002,7 +1043,7 @@
}
}
Expand Down
11 changes: 11 additions & 0 deletions patches/net/minecraft/client/gui/GuiSlot.java.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/net/minecraft/client/gui/GuiSlot.java
+++ b/net/minecraft/client/gui/GuiSlot.java
@@ -317,7 +317,7 @@
{
if (this.isMouseYWithinSlotBounds(this.mouseY))
{
- if (Mouse.getEventButton() == 0 && Mouse.getEventButtonState() && this.mouseY >= this.top && this.mouseY <= this.bottom)
+ if ((Mouse.getEventButton() == 0|| GuiScreen.mouseDown) && Mouse.getEventButtonState() && this.mouseY >= this.top && this.mouseY <= this.bottom)
{
int i = (this.width - this.getListWidth()) / 2;
int j = (this.width + this.getListWidth()) / 2;
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--- a/net/minecraft/client/gui/inventory/GuiContainerCreative.java
+++ b/net/minecraft/client/gui/inventory/GuiContainerCreative.java
@@ -7,6 +7,7 @@
import java.util.Map;
import javax.annotation.Nullable;
import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.GuiTextField;
import net.minecraft.client.gui.achievement.GuiAchievements;
import net.minecraft.client.gui.achievement.GuiStats;
@@ -581,7 +582,7 @@
*/
public void drawScreen(int mouseX, int mouseY, float partialTicks)
{
- boolean flag = Mouse.isButtonDown(0);
+ boolean flag = Mouse.isButtonDown(0)|| GuiScreen.mouseDown;
int i = this.guiLeft;
int j = this.guiTop;
int k = i + 175;
Loading

0 comments on commit 6769438

Please sign in to comment.