diff --git a/patches/common/net/minecraft/src/EntityLiving.java.patch b/patches/common/net/minecraft/src/EntityLiving.java.patch index 2bf1ccfa7e..04054c93da 100644 --- a/patches/common/net/minecraft/src/EntityLiving.java.patch +++ b/patches/common/net/minecraft/src/EntityLiving.java.patch @@ -151,7 +151,7 @@ /** * Remove the speified potion effect from this entity. */ -@@ -2861,4 +2906,30 @@ +@@ -2861,4 +2906,42 @@ { this.dataWatcher.updateObject(10, Byte.valueOf((byte)par1)); } @@ -180,5 +180,17 @@ + onFinishedPotionEffect(effect); + } + } ++ } ++ ++ /** ++ * Returns true if the entity's rider (EntityPlayer) should face forward when mounted. ++ * currently only used in vanilla code by pigs. ++ * ++ * @param player The player who is riding the entity. ++ * @return If the player should orient the same direction as this entity. ++ */ ++ public boolean shouldRiderFaceForward(EntityPlayer player) ++ { ++ return this instanceof EntityPig; + } } diff --git a/patches/common/net/minecraft/src/EntityPlayer.java.patch b/patches/common/net/minecraft/src/EntityPlayer.java.patch index b74e34dfd3..e687f134fb 100644 --- a/patches/common/net/minecraft/src/EntityPlayer.java.patch +++ b/patches/common/net/minecraft/src/EntityPlayer.java.patch @@ -26,6 +26,20 @@ if (this.itemInUseCount <= 25 && this.itemInUseCount % 4 == 0) { this.updateItemUse(var1, 5); +@@ -448,11 +460,11 @@ + this.cameraYaw = 0.0F; + this.addMountedMovementStat(this.posX - var1, this.posY - var3, this.posZ - var5); + +- if (this.ridingEntity instanceof EntityPig) ++ if (this.ridingEntity instanceof EntityLiving && ((EntityLiving)ridingEntity).shouldRiderFaceForward(this)) + { + this.rotationPitch = var8; + this.rotationYaw = var7; +- this.renderYawOffset = ((EntityPig)this.ridingEntity).renderYawOffset; ++ this.renderYawOffset = ((EntityLiving)this.ridingEntity).renderYawOffset; + } + } + @@ -575,6 +587,9 @@ this.setPosition(this.posX, this.posY, this.posZ); this.motionY = 0.10000000149011612D;