Skip to content

Commit

Permalink
Bow update
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbudda committed Jun 3, 2016
1 parent 8a190ce commit 22de123
Show file tree
Hide file tree
Showing 16 changed files with 2,161 additions and 1,240 deletions.
3 changes: 2 additions & 1 deletion installer/Installer.java
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ private void sleep(int millis)
public Void doInBackground()
{
StringBuilder sbErrors = new StringBuilder();
String minecriftVersionName = "Vivecraft-" + version + mod;
String minecriftVersionName = "vivecraft-" + version + mod;
boolean checkedRedists = false;
boolean redistSuccess = true;
boolean downloadedForge = false;
Expand Down Expand Up @@ -980,6 +980,7 @@ private boolean updateLauncherJson(File mcBaseDirFile, String minecriftVer)
prof.put("javaArgs", "-Xmx2G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn256M -Dfml.ignoreInvalidMinecraftCertificates=true -Dfml.ignorePatchDiscrepancies=true");
prof.put("useHopperCrashService", false);
prof.put("launcherVisibilityOnGameClose", "keep the launcher open");
prof.put("launcherVisibilityOnGameClose", "keep the launcher open");
profiles.put(profileName, prof);
}
prof.put("lastVersionId", minecriftVer + mod);
Expand Down
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 = "Vivecraft-jrbudda13"
minecrift_build = "Vivecraft-jrbudda14"
of_file_extension = ".jar"
mcp_version = "mcp908"
mcp_uses_generics = False
Expand Down
39 changes: 25 additions & 14 deletions patches/net/minecraft/client/Minecraft.java.patch
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
--- a/net/minecraft/client/Minecraft.java
+++ b/net/minecraft/client/Minecraft.java
@@ -9,19 +9,40 @@
@@ -9,19 +9,41 @@
import com.google.common.util.concurrent.ListenableFutureTask;
import com.mojang.authlib.minecraft.MinecraftSessionService;
import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService;
+import com.mtbs3d.minecrift.api.*;
+import com.mtbs3d.minecrift.control.GuiScreenNavigator;
+import com.mtbs3d.minecrift.gameplay.BowTracker;
+import com.mtbs3d.minecrift.gameplay.VRPlayer;
+import com.mtbs3d.minecrift.provider.*;
+import com.mtbs3d.minecrift.render.FBOParams;
Expand Down Expand Up @@ -41,7 +42,7 @@
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
@@ -30,26 +51,18 @@
@@ -30,26 +52,18 @@
import java.util.concurrent.Callable;
import java.util.concurrent.Executors;
import java.util.concurrent.FutureTask;
Expand Down Expand Up @@ -74,15 +75,15 @@
import net.minecraft.client.gui.achievement.GuiAchievement;
import net.minecraft.client.gui.inventory.GuiInventory;
import net.minecraft.client.gui.stream.GuiStreamUnavailable;
@@ -97,6 +110,7 @@
@@ -97,6 +111,7 @@
import net.minecraft.client.settings.GameSettings;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.client.shader.Framebuffer;
+import net.minecraft.client.shader.ShaderGroup;
import net.minecraft.client.stream.IStream;
import net.minecraft.client.stream.NullStream;
import net.minecraft.client.stream.TwitchStream;
@@ -127,6 +141,8 @@
@@ -127,6 +142,8 @@
import net.minecraft.profiler.Profiler;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.integrated.IntegratedServer;
Expand All @@ -91,15 +92,15 @@
import net.minecraft.stats.AchievementList;
import net.minecraft.stats.IStatStringFormat;
import net.minecraft.stats.StatFileWriter;
@@ -142,6 +158,7 @@
@@ -142,6 +159,7 @@
import net.minecraft.util.Session;
import net.minecraft.util.Timer;
import net.minecraft.util.Util;
+import net.minecraft.util.Vec3;
import net.minecraft.world.EnumDifficulty;
import net.minecraft.world.WorldProviderEnd;
import net.minecraft.world.WorldProviderHell;
@@ -150,640 +167,934 @@
@@ -150,640 +168,936 @@
import net.minecraft.world.storage.ISaveFormat;
import net.minecraft.world.storage.ISaveHandler;
import net.minecraft.world.storage.WorldInfo;
Expand Down Expand Up @@ -860,6 +861,8 @@
+ private final Proxy proxy;
+ private ISaveFormat saveLoader;
+
+ public BowTracker bowTracker = new BowTracker();
+
+ /**
+ * This is set to fpsCounter every debug screen update, and is shown on the debug screen. It's also sent as part of
+ * the usage snooping.
Expand Down Expand Up @@ -1022,7 +1025,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 Vivecraft-jrbudda13";
+ public final String minecriftVerString = "ViveCraft 1.7.10 Vivecraft-jrbudda14";
+ /* end version */
+ /** END MINECRIFT */
+
Expand Down Expand Up @@ -1657,7 +1660,7 @@
{
this.mojangLogo = this.renderEngine.getDynamicTextureLocation("logo", new DynamicTexture(ImageIO.read(this.mcDefaultResourcePack.getInputStream(locationMojangPng))));
this.renderEngine.bindTexture(this.mojangLogo);
@@ -791,2348 +1102,3870 @@
@@ -791,2348 +1105,3878 @@
catch (IOException var7)
{
logger.error("Unable to load logo: " + locationMojangPng, var7);
Expand Down Expand Up @@ -2886,6 +2889,12 @@
+ PredictedDisplayTimeSeconds = this.stereoProvider.getFrameTiming();
+ }
+
+ //I dunno where to put this.
+ if(lookaimController instanceof MCOpenVR){
+ bowTracker.doProcess((MCOpenVR) this.lookaimController, thePlayer);
+ }
+
+
+ // End display size hack
+ disableGuiSizeHack();
+
Expand All @@ -2898,6 +2907,8 @@
+ int currentDisplayWidth = this.displayWidth;
+ int currentDisplayHeight = this.displayHeight;
+
+
+
+ /** Minecrift - main stereo render loop **/
+ for (int i = 0; this.visible && i < viewPortCount; i++)
+ {
Expand Down Expand Up @@ -2940,7 +2951,7 @@
+ //this.mcProfiler.endSection();
+
+ // Update our orientation and position variables from the sensor polled data
+ this.entityRenderer.updatePositionAndOrientation(this.timer.renderPartialTicks, Display.isActive());
+ this.entityRenderer.updatePositionAndOrientation(this.timer.renderPartialTicks, Display.isActive());
+
+ if (!this.skipRenderWorld)
+ {
Expand All @@ -2953,11 +2964,11 @@
+ Reflector.callVoid(fmlCommonHandler, Reflector.FMLCommonHandler_onRenderTickStart, new Object[]{this.timer.renderPartialTicks});
+ }
+ this.mcProfiler.endStartSection("gameRenderer");
+
+ ///THIS IS WHERE EVERYTHING IS RENDERED
+
+ ///THIS IS WHERE EVERYTHING IS RENDERED
+ this.entityRenderer.updateCameraAndRender(this.timer.renderPartialTicks);
+
+
+
+
+ this.mcProfiler.endSection();
+ if (fmlCommonHandler != null) {
+ Reflector.callVoid(fmlCommonHandler, Reflector.FMLCommonHandler_onRenderTickEnd, new Object[]{this.timer.renderPartialTicks});
Expand Down Expand Up @@ -5548,7 +5559,7 @@
+
+ if (this.thePlayer.isUsingItem())
+ {
+ if (!this.gameSettings.keyBindUseItem.getIsKeyPressed())
+ if (!this.gameSettings.keyBindUseItem.getIsKeyPressed() && bowTracker.isActive(thePlayer) == false)
+ {
+ this.playerController.onStoppedUsingItem(this.thePlayer);
+ }
Expand Down
12 changes: 7 additions & 5 deletions patches/net/minecraft/client/model/ModelBiped.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,12 @@
}
}

@@ -119,6 +233,16 @@
@@ -119,6 +233,18 @@
*/
public void setRotationAngles(float p_78087_1_, float p_78087_2_, float p_78087_3_, float p_78087_4_, float p_78087_5_, float p_78087_6_, Entity p_78087_7_)
{
+ /** MINECRIFT **/
+
+ if (this.vrMode) {
+ if (!initialisedForVr) {
+ initForVr();
Expand All @@ -184,11 +185,12 @@
+ this.bipedBody.rotateAngleX = 0;
+ this.bipedBody.rotateAngleZ = 0;
+ }
+
+ /** END MINECRIFT **/
this.bipedHead.rotateAngleY = p_78087_4_ / (180F / (float)Math.PI);
this.bipedHead.rotateAngleX = p_78087_5_ / (180F / (float)Math.PI);
this.bipedHeadwear.rotateAngleY = this.bipedHead.rotateAngleY;
@@ -142,6 +266,9 @@
@@ -142,6 +268,9 @@
this.bipedLeftLeg.rotateAngleY = -((float)Math.PI / 10F);
}

Expand All @@ -198,7 +200,7 @@
if (this.heldItemLeft != 0)
{
this.bipedLeftArm.rotateAngleX = this.bipedLeftArm.rotateAngleX * 0.5F - ((float)Math.PI / 10F) * (float)this.heldItemLeft;
@@ -181,25 +308,75 @@
@@ -181,25 +310,75 @@

if (this.isSneak)
{
Expand Down Expand Up @@ -290,7 +292,7 @@
}

this.bipedRightArm.rotateAngleZ += MathHelper.cos(p_78087_3_ * 0.09F) * 0.05F + 0.05F;
@@ -233,8 +410,12 @@
@@ -233,8 +412,12 @@
{
this.bipedEars.rotateAngleY = this.bipedHead.rotateAngleY;
this.bipedEars.rotateAngleX = this.bipedHead.rotateAngleX;
Expand All @@ -305,7 +307,7 @@
this.bipedEars.render(p_78110_1_);
}

@@ -245,4 +426,18 @@
@@ -245,4 +428,18 @@
{
this.bipedCloak.render(p_78111_1_);
}
Expand Down
Loading

0 comments on commit 22de123

Please sign in to comment.