This is a modified version of the Minecrift VR mod that focuses on the Vive and room scale VR. It adds a teleporting method of locomotion and tracked controller support to interact with the world.
This mod uses phr00t's JOpenVR wrapper from his JMonkeyVR project. Be sure to check that out! Thanks also go to StellaArtois, Mabrowning and everyone else who worked on the Minecrift mod.
Also take a look at jrbudda's fork of this project, which adds a number of improvements and is being worked on a lot at the moment! You can also find a pre-built installer there.
Right controller:
Left controller:
You can also swing your pickaxe at blocks or swing your sword at enemies to hit them.
Multiplayer will work if all clients and the server are running this mod. If you connect to a vanilla Minecraft server, it will fall back to a traditional movement scheme with continuous camera movement, which typically causes some amount of nausea for VR users. This is because vanilla servers don't allow clients to teleport as a form of cheat protection. You can also force the traditional movement scheme in singleplayer by pressing Right CTRL+R.
If you're seeing lots of judder, try lowering your Minecraft video settings. Setting graphics from Fancy to Fast or reducing the view distance should help.
You should then have a Vive installer .exe you can run to install the mod.
For programmers/contributors:
Since this branch focuses on room scale, it makes a number of invasive changes to Minecrift that make it unsuitable for merging back into the main branch for now. These changes were made in a quick and dirty fashion to easily experiment and get something playable. They are all commented with "// VIVE". They should serve to highlight the problematic areas of vanilla Minecraft for a control scheme like this. Lots of small changes were made to avoid nausea and support tracked controllers independent of the player. The Matrix/Vector/Quaternion operations are kind of a mess, since there are multiple implementations of these classes available with slightly different features (Vec3 in particular is heavily used in Minecraft 1.7.10 but has a pretty poor feature set) and quite a lot of Minecraft's code uses coordinates relative to something that isn't helpful for independent objects.
Some major new concepts are:
1) Room origin - these are the coordinates in the world corresponding to the centre of your room. These coordinates and the player's coordinates are updated whenever you teleport around.
2) Player movement - the player entity's X/Z coords are set continuously as the VR headset moves around the room. This keeps the player entity at your current real world position (offset from the room origin).
3) Aim source - this is the 3D position in the world of each controller.
Below is the original Minecrift README:
The latest maintained code can be found in the branches:
Minecrift 1.7 (with Forge support): 'port_to_1_7_10' Minecrift 1.8: 'port_to_1_8_1'
A typical set of commands to retrieve the source correctly (including all required submodules) is shown below (you'll require a newish version of git installed and setup for commandline operation) e.g. for branch 1.7.10:
For OSX / Linux:
git clone -b port_to_1_7_10 https://github.com/mabrowning/minecrift.git ~/minecrift-public-1710 cd ~/minecrift-public-1710 git submodule update --init --recursive
For Windows:
git clone -b port_to_1_7_10 https://github.com/mabrowning/minecrift.git c:\minecrift-public-1710 cd /D c:\minecrift-public-1710 git submodule update --init --recursive
The build process has been tested on Windows 8.1, OSX 10.10, and Ubuntu 14.10. It utilises the MCP (Minecraft Coders Pack). To install and build a clean checkout of this repo, you should run the following from the root of the repo directory:
For OSX / Linux:
./install.sh ./build.sh
For Windows:
install.bat build.bat
NOTE: Build errors will be seen in the console during the install process (the initial MCP rebuild will fail). This is normal - the code is later patched to compile correctly.
These scripts will generate deobfuscated Minecrift source in mcpxxx/src/minecraft (with the 'unaltered'
source in mcpxxx/src/minecraft_orig). Required libs and natives will be in lib/
This is currently a manual process (if anyone has maven / gradle experience and is willing to help create an automated project setup process let us know). NOTE: Assumes the project working & current directory is the root of this repo.
Add the following to your Eclipse / Idea / whatever project:
Non-Forge +++++++++
Java Source (in order):
Libraries:
Run Configuration:
Main class: Start
JVM args:
Linux:
-Djava.library.path=./JRift/JRiftLibrary/natives/linux;./Sixense-Java/SixenseJavaLibrary/natives/linux;./JMumbleLink/JMumbleLibrary/natives/linux;./lib/
Program args (these are optional; but allow you to test on Minecraft multiplayer servers):
--username
TBC: How to setup the minecraft assets for the debugger.
Forge +++++
This is somewhat more complicated! TBD.
See The License File for more information.
StellaArtois, mabrowning 2013, 2014, 2015
Detailed Information
It consists of a number of stages (and associated build scripts):
Install This is used to install the Minecrift source from a clean checkout of this repo, to a deobfuscated source environment. MCP is extracted, and patched where necessary. Optifine is merged into the Minecraft jar, and then the MCP decompile / build process is run. This initial build will fail due to Optifine induced build errors. We patch those errors (the first stage patch), then rebuild and generate the client MD5s that MCP will use to determine which files are modified. Clean Minecraft + Optifine source (with build erros corrected) will be present in mcpxxx/src/minecraft_orig. Finally we apply the actual Minecrift patches (the second stage patch). Minecrift deobfuscated source will now be present in mcpxxx/src/minecraft.
Build This builds the obfuscated Minecrift jar, and builds the versioned installer. The scripts update the Minecrift version numbers in the source, as read from minecriftversion.py. Then MCP recompiles the Minecrift source (checking for build errors), reobfuscates any changed files (as compared to the source in mcpxxx/src/minecraft_orig) and then these files are added to a minecrift.jar. The installer is build, versioned and minecrift.jar embedded within.
More to come...