mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-15 02:15:34 -04:00
it: ensure spectators are aways allowed to fly
This commit is contained in:
parent
ff13ad53eb
commit
712d08ca5f
@ -109,4 +109,23 @@ class FlyIT {
|
|||||||
player.assertGround(false)
|
player.assertGround(false)
|
||||||
assertTrue(player.abilities.flying)
|
assertTrue(player.abilities.flying)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun spectatorNotAllowedFly() {
|
||||||
|
// maybe not vanilla
|
||||||
|
val player = createPlayer(createConnection(3))
|
||||||
|
player.additional.gamemode = Gamemodes.SPECTATOR
|
||||||
|
player.abilities = Abilities(allowFly = false, flying = false)
|
||||||
|
player.forceTeleport(Vec3d(17.0, 9.5, 8.0))
|
||||||
|
player.connection.world[Vec3i(17, 8, 8)] = StoneTest0.state
|
||||||
|
|
||||||
|
player.inputActions = MovementInputActions(toggleFly = true)
|
||||||
|
player.runTicks(1)
|
||||||
|
player.assertGround(false)
|
||||||
|
assertTrue(player.abilities.flying)
|
||||||
|
|
||||||
|
player.inputActions = MovementInputActions(toggleFly = true)
|
||||||
|
player.runTicks(1)
|
||||||
|
player.assertGround(false)
|
||||||
|
assertTrue(player.abilities.flying)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user