diff --git a/patches/minecraft/net/minecraft/entity/Entity.java.patch b/patches/minecraft/net/minecraft/entity/Entity.java.patch index a38d7c938..9eada4431 100644 --- a/patches/minecraft/net/minecraft/entity/Entity.java.patch +++ b/patches/minecraft/net/minecraft/entity/Entity.java.patch @@ -155,7 +155,7 @@ } public boolean func_96091_a(Explosion par1Explosion, World par2World, int par3, int par4, int par5, int par6, float par7) -@@ -2426,4 +2496,160 @@ +@@ -2426,4 +2496,170 @@ { return this.getEntityName(); } @@ -314,5 +314,15 @@ + public boolean canRiderInteract() + { + return false; ++ } ++ ++ /** ++ * If the rider should be dismounted from the entity when the entity goes under water ++ * ++ * @param rider The entity that is riding ++ * @return if the entity should be dismounted when under water ++ */ ++ public boolean shouldDismountInWater(Entity rider){ ++ return this instanceof EntityLivingBase; + } } diff --git a/patches/minecraft/net/minecraft/entity/EntityLivingBase.java.patch b/patches/minecraft/net/minecraft/entity/EntityLivingBase.java.patch index 02b126c4d..1a3dc1445 100644 --- a/patches/minecraft/net/minecraft/entity/EntityLivingBase.java.patch +++ b/patches/minecraft/net/minecraft/entity/EntityLivingBase.java.patch @@ -20,6 +20,15 @@ public abstract class EntityLivingBase extends Entity { +@@ -299,7 +302,7 @@ + + this.extinguish(); + +- if (!this.worldObj.isRemote && this.isRiding() && this.ridingEntity instanceof EntityLivingBase) ++ if (!this.worldObj.isRemote && this.isRiding() && ridingEntity!=null && ridingEntity.shouldDismountInWater(this)) + { + this.mountEntity((Entity)null); + } @@ -446,6 +449,7 @@ { this.entityLivingToAttack = par1EntityLivingBase;