fix sharking

This commit is contained in:
CoolMineman 2020-07-31 23:05:06 -05:00
parent 1556c203e1
commit 7e3dc0f754
No known key found for this signature in database
GPG Key ID: 2439F5FE115256DD
2 changed files with 17 additions and 17 deletions

View File

@ -28,7 +28,7 @@ public class ModConfig
public static double SHARKING_SURFACE_TENSION = SHARKING_SURFACE_TENSION_DEFAULT;
private static final String SHARKING_SURFACE_TENSION_NAME = "sharkingSurfaceTension";
private static final double SHARKING_WATER_FRICTION_DEFAULT = 0.1D;
private static final double SHARKING_WATER_FRICTION_DEFAULT = 0.99D;
public static double SHARKING_WATER_FRICTION = SHARKING_WATER_FRICTION_DEFAULT;
private static final String SHARKING_WATER_FRICTION_NAME = "sharkingWaterFriction";

View File

@ -336,16 +336,16 @@ public class QuakeClientPlayer
private static void minecraft_WaterMove(PlayerEntity player, Vec3d movementInput)
{
// double d0 = player.y;
// player.updateVelocity(0.04F, movementInput);
// player.move(MovementType.SELF, player.getVelocity());
// Vec3d velocity = player.getVelocity().multiply(0.800000011920929D).add(0, 0.02D, 0);
// player.setVelocity(velocity);
//
// if (player.horizontalCollision && player.method_5654(velocity.x, velocity.y + 0.6000000238418579D - player.y + d0, velocity.z))
// {
// player.setVelocity(velocity.x, 0.30000001192092896D, velocity.z);
// }
double d0 = player.getY();
player.updateVelocity(0.04F, movementInput);
player.move(MovementType.SELF, player.getVelocity());
Vec3d velocity = player.getVelocity().multiply(0.800000011920929D).add(0, 0.02D, 0);
player.setVelocity(velocity);
if (player.horizontalCollision && player.doesNotCollide(velocity.x, velocity.y + 0.6000000238418579D - player.getY() + d0, velocity.z))
{
player.setVelocity(velocity.x, 0.30000001192092896D, velocity.z);
}
}
/*
@ -411,12 +411,12 @@ public class QuakeClientPlayer
}
else if (player.isTouchingWater() && !player.abilities.flying)
{
// if (ModConfig.SHARKING_ENABLED)
// quake_WaterMove(player, (float) movementInput.x, (float) movementInput.y, (float) movementInput.z);
// else
// {
return false;
// }
if (ModConfig.SHARKING_ENABLED)
quake_WaterMove(player, (float) movementInput.x, (float) movementInput.y, (float) movementInput.z);
else
{
return false;
}
}
else
{