Skip to content

Commit 876e259

Browse files
committed
fix compilation on 1.21.1+
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
1 parent 63ddbde commit 876e259

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/kotlin/ru/octol1ttle/flightassistant/impl/computer/safety/ElytraStatusComputer.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ class ElytraStatusComputer(computers: ComputerBus) : Computer(computers) {
5252
/*net.minecraft.world.entity.EquipmentSlot.VALUES.any { data.player.getItemBySlot(it) == activeElytra && net.minecraft.world.entity.LivingEntity.canGlideUsing(data.player.getItemBySlot(it), it) }
5353
*///?} else
5454
data.player.armorSlots.contains(activeElytra) && net.minecraft.world.item.ElytraItem.isFlyEnabled(activeElytra!!)
55-
val noneClimbable: Boolean = data.player.blockStateOn.notClimbable(data.player) && data.player.feetBlockState.notClimbable(data.player)
55+
val noneClimbable: Boolean = data.player.blockStateOn.notClimbable(data.player) &&
56+
//? if >=1.21.1 {
57+
/*data.player.inBlockState.notClimbable(data.player)
58+
*///?} else
59+
data.player.feetBlockState.notClimbable(data.player)
5660
val lookingToClutch: Boolean = data.pitch <= -70.0f
5761
if (FAConfig.safety.elytraAutoOpen && !flying && !data.fallDistanceSafe && hasUsableElytra && noneClimbable && !lookingToClutch) {
5862
sendSwitchState(data)

0 commit comments

Comments
 (0)