Skip to content

Commit

Permalink
tweaks v4
Browse files Browse the repository at this point in the history
fix things.
  • Loading branch information
jrbudda committed May 24, 2016
1 parent 25df205 commit b476932
Show file tree
Hide file tree
Showing 14 changed files with 260 additions and 83 deletions.
1 change: 0 additions & 1 deletion JMumbleLink
Submodule JMumbleLink deleted from 9250ba
2 changes: 1 addition & 1 deletion installer/Installer.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class Installer extends JPanel implements PropertyChangeListener
private static final long serialVersionUID = -562178983462626162L;
private String tempDir = System.getProperty("java.io.tmpdir");

private static final boolean ALLOW_FORGE_INSTALL = false; // VIVE: disabled, forge install isn't working currently
private static final boolean ALLOW_FORGE_INSTALL = true; // VIVE: disabled, forge install isn't working currently
private static final boolean ALLOW_HYDRA_INSTALL = false; // TODO: Change to true once Hydra is fixed up

private static final boolean NEEDS_2010_REDIST = true;
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 = "R2b-Vive-jrbudda3"
minecrift_build = "R2b-Vive-jrbudda4"
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 @@ -1018,7 +1018,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 = "Minecrift 1.7.10 R2b-Vive-jrbudda3";
+ public final String minecriftVerString = "Minecrift 1.7.10 R2b-Vive-jrbudda4";
+ /* end version */
+ /** END MINECRIFT */
+
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
--- a/net/minecraft/client/entity/EntityClientPlayerMP.java
+++ b/net/minecraft/client/entity/EntityClientPlayerMP.java
@@ -213,7 +213,9 @@
@@ -159,6 +159,11 @@
boolean var13 = var3 * var3 + var5 * var5 + var7 * var7 > 9.0E-4D || this.ticksSinceMovePacket >= 20;
boolean var14 = var9 != 0.0D || var11 != 0.0D;

+ if(!this.onGround) {
+ int a= 9;
+ }
+
+
if (this.ridingEntity != null)
{
this.sendQueue.addToSendQueue(new C03PacketPlayer.C06PacketPlayerPosLook(this.motionX, -999.0D, -999.0D, this.motionZ, this.rotationYaw, this.rotationPitch, this.onGround));
@@ -213,7 +218,9 @@
/**
* Joins the passed in entity item with the world. Args: entityItem
*/
Expand Down
11 changes: 10 additions & 1 deletion patches/net/minecraft/client/renderer/EntityRenderer.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -1916,7 +1916,7 @@
}

private void updateMainMenu(GuiMainMenu mainGui)
@@ -2650,4 +3377,1709 @@
@@ -2650,4 +3377,1718 @@
;
}
}
Expand Down Expand Up @@ -2096,6 +2096,8 @@
+ camRelY -= (mc.vrPlayer.roomOrigin.yCoord - py + teleportSlide.yCoord);
+ camRelZ += (mc.vrPlayer.roomOrigin.zCoord - pz + teleportSlide.zCoord);
+ }
+
+
+ // VIVE END - render camera from tracking origin, not player pos
+
+ if (this.mc.vrSettings.debugPose)
Expand Down Expand Up @@ -2939,6 +2941,10 @@
+
+ public void renderCrosshairAtDepth()
+ {
+
+ //debug room origin
+ // renderCircle(mc.vrPlayer.roomOrigin.addVector(-renderOriginX, -renderOriginY + 0.1f, -renderOriginZ), 0.2f, 32, 0, 255, 0, 255, 1);
+
+ if (this.aimStartPos != null)
+ {
+ Vec3 originOffset = renderOrigin.subtract(this.aimRenderOrigin);
Expand Down Expand Up @@ -3015,6 +3021,9 @@
+
+ // VIVE START - render teleport line
+ VRPlayer vrPlayer = mc.vrPlayer;
+
+
+
+ boolean renderTeleportLine = vrPlayer.movementTeleportDestination.xCoord != 0
+ || vrPlayer.movementTeleportDestination.yCoord != 0
+ || vrPlayer.movementTeleportDestination.zCoord != 0;
Expand Down
29 changes: 20 additions & 9 deletions patches/net/minecraft/entity/Entity.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,18 @@

protected abstract void entityInit();

@@ -1171,9 +1229,38 @@
@@ -857,6 +915,10 @@
this.isCollided = this.isCollidedHorizontally || this.isCollidedVertically;
this.updateFallState(y, this.onGround);

+ if(!this.onGround && this instanceof EntityPlayer) {
+ int a= 9;
+ }
+
if (var13 != x)
{
this.motionX = 0.0D;
@@ -1171,9 +1233,38 @@

if (var7.getMaterial() == materialIn)
{
Expand Down Expand Up @@ -177,7 +188,7 @@
}
else
{
@@ -1193,13 +1280,25 @@
@@ -1193,13 +1284,25 @@
{
return this.worldObj.isMaterialInBB(this.boundingBox.expand(-0.10000000149011612D, -0.4000000059604645D, -0.10000000149011612D), Material.lava);
}
Expand Down Expand Up @@ -205,7 +216,7 @@

if (var4 >= 1.0E-4F)
{
@@ -1213,11 +1312,68 @@
@@ -1213,11 +1316,68 @@
var4 = friction / var4;
strafe *= var4;
forward *= var4;
Expand Down Expand Up @@ -279,7 +290,7 @@
}

public int getBrightnessForRender(float p_70070_1_)
@@ -1526,6 +1682,31 @@
@@ -1526,6 +1686,31 @@
tagCompund.setInteger("PortalCooldown", this.timeUntilPortal);
tagCompund.setLong("UUIDMost", this.getUniqueID().getMostSignificantBits());
tagCompund.setLong("UUIDLeast", this.getUniqueID().getLeastSignificantBits());
Expand Down Expand Up @@ -311,7 +322,7 @@
this.writeEntityToNBT(tagCompund);

if (this.ridingEntity != null)
@@ -1596,6 +1777,37 @@
@@ -1596,6 +1781,37 @@

this.setPosition(this.posX, this.posY, this.posZ);
this.setRotation(this.rotationYaw, this.rotationPitch);
Expand Down Expand Up @@ -349,7 +360,7 @@
this.readEntityFromNBT(tagCompund);

if (this.shouldSetPosAfterLoading())
@@ -1697,7 +1909,16 @@
@@ -1697,7 +1913,16 @@
{
EntityItem var3 = new EntityItem(this.worldObj, this.posX, this.posY + (double)offsetY, this.posZ, itemStackIn);
var3.delayBeforeCanPickup = 10;
Expand All @@ -367,7 +378,7 @@
return var3;
}
else
@@ -2008,7 +2229,16 @@
@@ -2008,7 +2233,16 @@
*/
public boolean isRiding()
{
Expand All @@ -385,7 +396,7 @@
}

/**
@@ -2375,7 +2605,17 @@
@@ -2375,7 +2609,17 @@
*/
public float getExplosionResistance(Explosion explosionIn, World worldIn, int x, int y, int z, Block blockIn)
{
Expand All @@ -404,7 +415,7 @@
}

public boolean func_145774_a(Explosion explosionIn, World worldIn, int x, int y, int z, Block blockIn, float unused)
@@ -2453,6 +2693,204 @@
@@ -2453,6 +2697,204 @@

public void func_145781_i(int p_145781_1_) {}

Expand Down
4 changes: 2 additions & 2 deletions patches/net/minecraft/entity/EntityLivingBase.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,8 @@
}

- this.moveEntity(this.motionX, this.motionY, this.motionZ);
+ /** MINECRIFT **/
+ this.moveEntity(this.motionX / var3, this.motionY / (canAffectFlightPitch(isFlying) ? var3 : 1f), this.motionZ / var3);
+ /** MINECRIFT **/
+ this.moveEntity(this.motionX / var3, this.motionY / (canAffectFlightPitch(isFlying) ? var3 : 1f), this.motionZ / var3);
+ /** END MINECRIFT **/

if (this.isCollidedHorizontally && this.isOnLadder())
Expand Down
6 changes: 4 additions & 2 deletions patches/net/minecraft/entity/player/EntityPlayer.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@
- var4.motionX = (double)(-MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI) * var5);
- var4.motionZ = (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI) * var5);
- var4.motionY = (double)(-MathHelper.sin(this.rotationPitch / 180.0F * (float)Math.PI) * var5 + 0.1F);
+ var4.motionX = (double)(-MathHelper.sin(yaw / 180.0F * (float)Math.PI) * MathHelper.cos(pitch / 180.0F * (float)Math.PI) * var5);
+ var4.motionX = (double)(-MathHelper.sin(yaw / 180.0F * (float)Math.PI) * MathHelper.cos(yaw / 180.0F * (float)Math.PI) * var5);
+ var4.motionZ = (double)(MathHelper.cos(yaw / 180.0F * (float)Math.PI) * MathHelper.cos(yaw / 180.0F * (float)Math.PI) * var5);
+ var4.motionY = (double)(-MathHelper.sin(pitch / 180.0F * (float)Math.PI) * var5 + 0.1F);
var5 = 0.02F;
Expand Down Expand Up @@ -1351,7 +1351,7 @@
public static enum EnumStatus
{
OK("OK", 0),
@@ -2371,4 +3099,72 @@
@@ -2371,4 +3099,74 @@

private EnumStatus(String p_i1751_1_, int p_i1751_2_) {}
}
Expand All @@ -1371,7 +1371,9 @@
+
+ if (allowMoveEntity)
+ {
+ this.onGround = true;
+ super.moveEntity(x,y,z);
+
+ }
+ else
+ {
Expand Down
16 changes: 12 additions & 4 deletions patches/net/minecraft/network/NetHandlerPlayServer.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,15 @@
}

if (Math.abs(packetIn.getPositionX()) > 3.2E7D || Math.abs(packetIn.getPositionZ()) > 3.2E7D)
@@ -362,7 +357,9 @@
@@ -345,6 +340,7 @@

this.playerEntity.moveEntity(var13, var15, var17);
this.playerEntity.onGround = packetIn.func_149465_i();
+
this.playerEntity.addMovementStat(var13, var15, var17);
double var29 = var15;
var13 = var5 - this.playerEntity.posX;
@@ -362,7 +358,9 @@
if (var25 > 0.0625D && !this.playerEntity.isPlayerSleeping() && !this.playerEntity.theItemInWorldManager.isCreative())
{
var31 = true;
Expand All @@ -42,7 +50,7 @@
}

this.playerEntity.setPositionAndRotation(var5, var7, var9, var11, var12);
@@ -370,7 +367,9 @@
@@ -370,7 +368,9 @@

if (var28 && (var31 || !var32) && !this.playerEntity.isPlayerSleeping())
{
Expand All @@ -53,7 +61,7 @@
return;
}

@@ -1171,20 +1170,20 @@
@@ -1171,20 +1171,20 @@
{
var3 = var2.readItemStackFromBuffer();

Expand Down Expand Up @@ -84,7 +92,7 @@
if (var3.getItem() == Items.written_book && var4.getItem() == Items.writable_book)
{
var4.setTagInfo("author", new NBTTagString(this.playerEntity.getCommandSenderName()));
@@ -1333,6 +1332,13 @@
@@ -1333,6 +1333,13 @@
var41.updateItemName("");
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
--- a/net/minecraft/network/play/client/C03PacketPlayer.java
+++ b/net/minecraft/network/play/client/C03PacketPlayer.java
@@ -14,7 +14,7 @@
protected double stance;
protected float yaw;
protected float pitch;
- protected boolean field_149474_g;
+ protected boolean grounded;
protected boolean field_149480_h;
protected boolean rotating;
private static final String __OBFID = "CL_00001360";
@@ -23,7 +23,7 @@

public C03PacketPlayer(boolean p_i45256_1_)
{
- this.field_149474_g = p_i45256_1_;
+ this.grounded = p_i45256_1_;
}

/**
@@ -39,7 +39,7 @@
*/
public void readPacketData(PacketBuffer data) throws IOException
{
- this.field_149474_g = data.readUnsignedByte() != 0;
+ this.grounded = data.readUnsignedByte() != 0;
}

/**
@@ -47,7 +47,7 @@
*/
public void writePacketData(PacketBuffer data) throws IOException
{
- data.writeByte(this.field_149474_g ? 1 : 0);
+ data.writeByte(this.grounded ? 1 : 0);
}

public double getPositionX()
@@ -82,7 +82,7 @@

public boolean func_149465_i()
{
- return this.field_149474_g;
+ return this.grounded;
}

public boolean func_149466_j()
@@ -123,7 +123,7 @@
this.y = p_i45253_3_;
this.stance = p_i45253_5_;
this.z = p_i45253_7_;
- this.field_149474_g = p_i45253_9_;
+ this.grounded = p_i45253_9_;
this.field_149480_h = true;
}

@@ -164,7 +164,7 @@
{
this.yaw = p_i45255_1_;
this.pitch = p_i45255_2_;
- this.field_149474_g = p_i45255_3_;
+ this.grounded = p_i45255_3_;
this.rotating = true;
}

@@ -206,7 +206,7 @@
this.z = p_i45254_7_;
this.yaw = p_i45254_9_;
this.pitch = p_i45254_10_;
- this.field_149474_g = p_i45254_11_;
+ this.grounded = p_i45254_11_;
this.rotating = true;
this.field_149480_h = true;
}
42 changes: 42 additions & 0 deletions patches/net/minecraft/util/FoodStats.java.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
--- a/net/minecraft/util/FoodStats.java
+++ b/net/minecraft/util/FoodStats.java
@@ -39,9 +39,9 @@
/**
* Handles the food game logic.
*/
- public void onUpdate(EntityPlayer p_75118_1_)
+ public void onUpdate(EntityPlayer player)
{
- EnumDifficulty var2 = p_75118_1_.worldObj.difficultySetting;
+ EnumDifficulty var2 = player.worldObj.difficultySetting;
this.prevFoodLevel = this.foodLevel;

if (this.foodExhaustionLevel > 4.0F)
@@ -58,13 +58,13 @@
}
}

- if (p_75118_1_.worldObj.getGameRules().getGameRuleBooleanValue("naturalRegeneration") && this.foodLevel >= 18 && p_75118_1_.shouldHeal())
+ if (player.worldObj.getGameRules().getGameRuleBooleanValue("naturalRegeneration") && this.foodLevel >= 18 && player.shouldHeal())
{
++this.foodTimer;

if (this.foodTimer >= 80)
{
- p_75118_1_.heal(1.0F);
+ player.heal(1.0F);
this.addExhaustion(3.0F);
this.foodTimer = 0;
}
@@ -75,9 +75,9 @@

if (this.foodTimer >= 80)
{
- if (p_75118_1_.getHealth() > 10.0F || var2 == EnumDifficulty.HARD || p_75118_1_.getHealth() > 1.0F && var2 == EnumDifficulty.NORMAL)
+ if (player.getHealth() > 10.0F || var2 == EnumDifficulty.HARD || player.getHealth() > 1.0F && var2 == EnumDifficulty.NORMAL)
{
- p_75118_1_.attackEntityFrom(DamageSource.starve, 1.0F);
+ player.attackEntityFrom(DamageSource.starve, 1.0F);
}

this.foodTimer = 0;
Loading

0 comments on commit b476932

Please sign in to comment.