Files
MinecraftForge/patches/minecraft/net/minecraft/entity/EntityFlying.java.patch
T
howtonotwin 639589703d Add smarter getter for block slipperiness (#4116)
Fixed MC-119811, Boats rubber banding when dismounted.
2017-08-01 16:25:28 -05:00

25 lines
1.8 KiB
Diff

--- ../src-base/minecraft/net/minecraft/entity/EntityFlying.java
+++ ../src-work/minecraft/net/minecraft/entity/EntityFlying.java
@@ -44,7 +44,9 @@
if (this.field_70122_E)
{
- f = this.field_70170_p.func_180495_p(new BlockPos(MathHelper.func_76128_c(this.field_70165_t), MathHelper.func_76128_c(this.func_174813_aQ().field_72338_b) - 1, MathHelper.func_76128_c(this.field_70161_v))).func_177230_c().field_149765_K * 0.91F;
+ BlockPos underPos = new BlockPos(MathHelper.func_76128_c(this.field_70165_t), MathHelper.func_76128_c(this.func_174813_aQ().field_72338_b) - 1, MathHelper.func_76128_c(this.field_70161_v));
+ IBlockState underState = this.field_70170_p.func_180495_p(underPos);
+ f = underState.func_177230_c().getSlipperiness(underState, this.field_70170_p, underPos, this) * 0.91F;
}
float f1 = 0.16277136F / (f * f * f);
@@ -53,7 +55,9 @@
if (this.field_70122_E)
{
- f = this.field_70170_p.func_180495_p(new BlockPos(MathHelper.func_76128_c(this.field_70165_t), MathHelper.func_76128_c(this.func_174813_aQ().field_72338_b) - 1, MathHelper.func_76128_c(this.field_70161_v))).func_177230_c().field_149765_K * 0.91F;
+ BlockPos underPos = new BlockPos(MathHelper.func_76128_c(this.field_70165_t), MathHelper.func_76128_c(this.func_174813_aQ().field_72338_b) - 1, MathHelper.func_76128_c(this.field_70161_v));
+ IBlockState underState = this.field_70170_p.func_180495_p(underPos);
+ f = underState.func_177230_c().getSlipperiness(underState, this.field_70170_p, underPos, this) * 0.91F;
}
this.func_70091_d(MoverType.SELF, this.field_70159_w, this.field_70181_x, this.field_70179_y);