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 vanillaKickBypass by values.bool("Vanilla Kick Bypass", false)
|
||||
val vanillaKickBypass by values.bool("Vanilla Kick Bypass", true)
|
||||
|
||||
on { event: SendPacketEvent ->
|
||||
val (packet) = event
|
||||
|
@ -54,14 +54,16 @@ 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)
|
||||
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)
|
||||
flyKickCounter = 0
|
||||
|
|
Loading…
Reference in New Issue