Refactor flight's vanilla kick bypass

This commit is contained in:
Charlotte Som 2022-02-04 11:49:58 +00:00
parent 638e77d104
commit 6991269976

View file

@ -24,7 +24,7 @@ class Flight : Feature("Flight", FeatureCategory.MOVEMENT) {
}
val spoofAbilityPackets by values.bool("Spoof Outgoing Ability Packets", true)
val vanillaKickBypass by values.bool("Vanilla Kick Bypass", false)
val vanillaKickBypass by values.bool("Vanilla Kick Bypass", true)
on { event: SendPacketEvent ->
val (packet) = event
@ -54,13 +54,15 @@ class Flight : Feature("Flight", FeatureCategory.MOVEMENT) {
if (flyKickCounter == 16)
lockY = event.y - 0.03126
if (world.getBlockCollisions(
null,
player.boundingBox.offset(0.0, lockY - player.y, 0.0).expand(0.0625).stretch(0.0, -0.55, 0.0)
).all(VoxelShape::isEmpty)
) {
val playerNotColliding = world.getBlockCollisions(
null, player.boundingBox
.offset(0.0, lockY - player.y, 0.0)
.expand(0.0625)
.stretch(0.0, -0.55, 0.0)
).all(VoxelShape::isEmpty)
if (playerNotColliding)
event.y = lockY
}
}
if (flyKickCounter >= 24)