SurvivalFly - 1.13 Swimming (New Blocks)

Allow swimming through kelp plants
This commit is contained in:
CaptainObvious0 2019-03-06 21:21:35 -06:00 committed by GitHub
parent b222651b9c
commit 810e54cafa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -1948,12 +1948,14 @@ public class SurvivalFly extends Check {
// TODO: yDistance < 0.0 ?
final double maxSpeed = yDistance < 0.0 ? Magic.climbSpeedDescend : Magic.climbSpeedAscend;
if (Math.abs(yDistance) > maxSpeed) {
if (from.isOnGround(jumpHeight, 0D, 0D, BlockProperties.F_CLIMBABLE)) {
if (from.isOnGround(jumpHeight, 0D, 0D, BlockProperties.F_CLIMBABLE) & !((from.getBlockFlags() & BlockProperties.F_CLIMBLIQ) != 0)) {
if (yDistance > data.liftOffEnvelope.getMaxJumpGain(data.jumpAmplifier)+ 0.1) {
tags.add("climbstep");
vDistanceAboveLimit = Math.max(vDistanceAboveLimit, Math.abs(yDistance) - maxSpeed);
}
}
} if ((from.getBlockFlags() & BlockProperties.F_CLIMBLIQ) != 0) {
}
else {
tags.add("climbspeed");
vDistanceAboveLimit = Math.max(vDistanceAboveLimit, Math.abs(yDistance) - maxSpeed);