Refactor flight's vanilla kick bypass
parent
638e77d104
commit
6991269976
|
@ -24,7 +24,7 @@ class Flight : Feature("Flight", FeatureCategory.MOVEMENT) {
|
||||||
}
|
}
|
||||||
|
|
||||||
val spoofAbilityPackets by values.bool("Spoof Outgoing Ability Packets", true)
|
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 ->
|
on { event: SendPacketEvent ->
|
||||||
val (packet) = event
|
val (packet) = event
|
||||||
|
@ -54,13 +54,15 @@ class Flight : Feature("Flight", FeatureCategory.MOVEMENT) {
|
||||||
if (flyKickCounter == 16)
|
if (flyKickCounter == 16)
|
||||||
lockY = event.y - 0.03126
|
lockY = event.y - 0.03126
|
||||||
|
|
||||||
if (world.getBlockCollisions(
|
val playerNotColliding = world.getBlockCollisions(
|
||||||
null,
|
null, player.boundingBox
|
||||||
player.boundingBox.offset(0.0, lockY - player.y, 0.0).expand(0.0625).stretch(0.0, -0.55, 0.0)
|
.offset(0.0, lockY - player.y, 0.0)
|
||||||
).all(VoxelShape::isEmpty)
|
.expand(0.0625)
|
||||||
) {
|
.stretch(0.0, -0.55, 0.0)
|
||||||
|
).all(VoxelShape::isEmpty)
|
||||||
|
|
||||||
|
if (playerNotColliding)
|
||||||
event.y = lockY
|
event.y = lockY
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flyKickCounter >= 24)
|
if (flyKickCounter >= 24)
|
||||||
|
|
Loading…
Reference in New Issue