Skip to content

Commit

Permalink
40b
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbudda committed Jul 20, 2017
1 parent 9bf3b48 commit b47e6af
Show file tree
Hide file tree
Showing 19 changed files with 725 additions and 659 deletions.
533 changes: 231 additions & 302 deletions installer/Installer.java

Large diffs are not rendered by default.

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.7.10_HD_U_D1"
of_file_md5 = "57c724fe8335c82aef8d54c101043e60"
minecrift_version_num = "1.7.10"
minecrift_build = "jrbudda-39finalr1"
minecrift_build = "jrbudda-40b"
of_file_extension = ".jar"
mcp_version = "mcp908"
mcp_uses_generics = False
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 @@ -1246,7 +1246,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.7.10 jrbudda-39finalr1";
+ public final String minecriftVerString = "Vivecraft 1.7.10 jrbudda-40b";
+ private boolean trigger;
+ /* end version */
+ /** END MINECRIFT */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@
this.worldObj.playSound(this.posX, this.posY - (double)this.yOffset, this.posZ, name, volume, pitch, false);
}

@@ -662,4 +853,292 @@
@@ -662,4 +853,294 @@
}

protected void sendHorseJump() {}
Expand Down Expand Up @@ -532,6 +532,7 @@
+ if(this.capabilities.isFlying || this.inWater){
+ switch (mc.vrSettings.vrFreeMoveMode){
+ case VRSettings.FREEMOVE_CONTROLLER:
+ case VRSettings.FREEMOVE_JOYPAD:
+ directionVec.rotateAroundX(con.getControllerOffhandPitch_World() * PIOVER180);
+ break;
+ case VRSettings.FREEMOVE_HMD:
Expand All @@ -546,6 +547,7 @@
+
+ switch (mc.vrSettings.vrFreeMoveMode){
+ case VRSettings.FREEMOVE_CONTROLLER:
+ case VRSettings.FREEMOVE_JOYPAD:
+ directionVec.rotateAroundY(-con.getControllerOffhandYaw_World() * PIOVER180);
+ break;
+ case VRSettings.FREEMOVE_HMD:
Expand Down
11 changes: 10 additions & 1 deletion patches/net/minecraft/client/main/Main.java.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
--- a/net/minecraft/client/main/Main.java
+++ b/net/minecraft/client/main/Main.java
@@ -77,8 +77,8 @@
@@ -23,6 +23,8 @@

public class Main
{
+ public static boolean kiosk;
+ public static boolean katvr;
private static final java.lang.reflect.Type field_152370_a = new ParameterizedType()
{
private static final String __OBFID = "CL_00000828";
@@ -77,8 +79,8 @@
ArgumentAcceptingOptionSpec var12 = var1.accepts("uuid").withRequiredArg();
ArgumentAcceptingOptionSpec var13 = var1.accepts("accessToken").withRequiredArg().required();
ArgumentAcceptingOptionSpec var14 = var1.accepts("version").withRequiredArg().required();
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
+ float pitch = shooter.rotationPitch;
+
+
+ if (shooter instanceof EntityPlayer)
+ if (shooter.getEntityId() == Minecraft.getMinecraft().thePlayer.getEntityId())
+ {
+
+ Vec3 aimSource = Minecraft.getMinecraft().roomScale.getControllerPos_World(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
+ float yaw = shooter.rotationYaw;
+ float pitch = shooter.rotationPitch;
+
+ if (shooter instanceof EntityPlayer)
+ if (shooter.getEntityId() == Minecraft.getMinecraft().thePlayer.getEntityId())
+ {
+ Vec3 aimSource = Minecraft.getMinecraft().roomScale.getControllerPos_World(0);
+ Vec3 controllerDirection = Minecraft.getMinecraft().roomScale.getControllerMainDir_World();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
+ float pitch = shooter.rotationPitch;
+
+
+ if (shooter instanceof EntityPlayer)
+ if (shooter.getEntityId() == Minecraft.getMinecraft().thePlayer.getEntityId())
+ {
+ Vec3 aimSource = Minecraft.getMinecraft().roomScale.getControllerPos_World(0);
+ Vec3 controllerDirection = Minecraft.getMinecraft().roomScale.getControllerMainDir_World();
Expand Down
51 changes: 0 additions & 51 deletions patches/net/minecraft/src/RandomMobs.java.patch

This file was deleted.

47 changes: 0 additions & 47 deletions patches/net/minecraft/src/WrUpdateThread.java.patch

This file was deleted.

30 changes: 26 additions & 4 deletions patches/net/minecraft/util/MovementInputFromOptions.java.patch
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
--- a/net/minecraft/util/MovementInputFromOptions.java
+++ b/net/minecraft/util/MovementInputFromOptions.java
@@ -1,5 +1,7 @@
@@ -1,6 +1,11 @@
package net.minecraft.util;

+import com.mtbs3d.minecrift.control.VRControllerButtonMapping;
+import com.mtbs3d.minecrift.provider.MCOpenVR;
+import com.mtbs3d.minecrift.settings.VRSettings;
+import net.minecraft.client.Minecraft;
import net.minecraft.client.settings.GameSettings;
+import net.minecraft.client.settings.KeyBinding;

public class MovementInputFromOptions extends MovementInput
@@ -14,8 +16,12 @@
{
@@ -14,8 +19,12 @@

public void updatePlayerMoveState()
{
Expand All @@ -23,13 +27,31 @@

if (this.gameSettings.keyBindForward.getIsKeyPressed())
{
@@ -37,13 +43,30 @@
@@ -36,14 +45,47 @@
{
--this.moveStrafe;
}
-
- this.jump = this.gameSettings.keyBindJump.getIsKeyPressed();
- this.sneak = this.gameSettings.keyBindSneak.getIsKeyPressed();
+
+ Minecraft mc = Minecraft.getMinecraft();
+ if(mc.vrSettings.vrFreeMoveMode == mc.vrSettings.FREEMOVE_JOYPAD){
+ //override everything
+ this.moveForward = MCOpenVR.joyPadZ;
+ this.moveStrafe = MCOpenVR.joyPadX;
+
+ //just assuming all this below is needed for compatibility.
+ boolean forwardKeyDown = this.moveForward > 0;
+ boolean backKeyDown = this.moveForward < 0;
+ boolean leftKeyDown = this.moveStrafe < 0 ;
+ boolean rightKeyDown = this.moveStrafe > 0;
+ KeyBinding.setKeyBindState(this.gameSettings.keyBindForward, forwardKeyDown);
+ KeyBinding.setKeyBindState(this.gameSettings.keyBindBack, backKeyDown);
+ KeyBinding.setKeyBindState(this.gameSettings.keyBindLeft, leftKeyDown);
+ KeyBinding.setKeyBindState(this.gameSettings.keyBindRight, rightKeyDown);
+ }
+
+ boolean ok = Minecraft.getMinecraft().currentScreen==null && (mc.vrPlayer.getFreeMoveMode() || mc.vrSettings.simulateFalling);
+
+ //VIVECRAFT DO ok.
Expand Down
Loading

0 comments on commit b47e6af

Please sign in to comment.