Files
CatServer/patches/net/minecraft/entity/EntityFlying.java.patch
2019-02-24 22:29:41 +08:00

25 lines
1.5 KiB
Diff

--- ../src-base/minecraft/net/minecraft/entity/EntityFlying.java
+++ ../src-work/minecraft/net/minecraft/entity/EntityFlying.java
@@ -44,7 +44,9 @@
if (this.onGround)
{
- f = this.world.getBlockState(new BlockPos(MathHelper.floor(this.posX), MathHelper.floor(this.getEntityBoundingBox().minY) - 1, MathHelper.floor(this.posZ))).getBlock().slipperiness * 0.91F;
+ BlockPos underPos = new BlockPos(MathHelper.floor(this.posX), MathHelper.floor(this.getEntityBoundingBox().minY) - 1, MathHelper.floor(this.posZ));
+ IBlockState underState = this.world.getBlockState(underPos);
+ f = underState.getBlock().getSlipperiness(underState, this.world, underPos, this) * 0.91F;
}
float f1 = 0.16277136F / (f * f * f);
@@ -53,7 +55,9 @@
if (this.onGround)
{
- f = this.world.getBlockState(new BlockPos(MathHelper.floor(this.posX), MathHelper.floor(this.getEntityBoundingBox().minY) - 1, MathHelper.floor(this.posZ))).getBlock().slipperiness * 0.91F;
+ BlockPos underPos = new BlockPos(MathHelper.floor(this.posX), MathHelper.floor(this.getEntityBoundingBox().minY) - 1, MathHelper.floor(this.posZ));
+ IBlockState underState = this.world.getBlockState(underPos);
+ f = underState.getBlock().getSlipperiness(underState, this.world, underPos, this) * 0.91F;
}
this.move(MoverType.SELF, this.motionX, this.motionY, this.motionZ);