mirror of
https://gitlab.bixilon.de/bixilon/pixlyzer-physics.git
synced 2025-09-27 15:00:59 -04:00
cobweb test
This commit is contained in:
parent
6ec512cf37
commit
b1315f2682
@ -75,6 +75,7 @@ This [pixlyzer](https://gitlab.bixilon.de/bixilon/pixlyzer) module runs physics
|
||||
- fishing rod?
|
||||
- precision loss (high coordinates 20M+)
|
||||
- world border
|
||||
- end of world
|
||||
- abilities (flying, walk speed, fly speed)
|
||||
|
||||
## Additional entity physics
|
||||
|
@ -3,6 +3,7 @@ package de.bixilon.pixlyzer.physics
|
||||
import de.bixilon.kutil.string.StringUtil.toSnakeCase
|
||||
import de.bixilon.pixlyzer.PixLyzer
|
||||
import de.bixilon.pixlyzer.physics.tests.*
|
||||
import de.bixilon.pixlyzer.physics.tests.blocks.CobwebTest
|
||||
import de.bixilon.pixlyzer.physics.tests.enchantments.NoEnchantmentTest
|
||||
import de.bixilon.pixlyzer.physics.tests.enchantments.SoulSpeed2Test
|
||||
import de.bixilon.pixlyzer.physics.tests.enchantments.SoulSpeedTest
|
||||
@ -47,6 +48,7 @@ object PhysicsExtractor {
|
||||
SoulSpeed2Test::class.java,
|
||||
SwiftSneakTest::class.java,
|
||||
ServerVelocityTest::class.java,
|
||||
CobwebTest::class.java,
|
||||
)
|
||||
|
||||
|
||||
|
@ -0,0 +1,72 @@
|
||||
package de.bixilon.pixlyzer.physics.tests.blocks
|
||||
|
||||
import de.bixilon.pixlyzer.physics.tests.AbstractTest
|
||||
import de.bixilon.pixlyzer.physics.tests.ExtractorMethod
|
||||
import net.minecraft.block.Blocks
|
||||
|
||||
class CobwebTest : AbstractTest() {
|
||||
|
||||
@ExtractorMethod
|
||||
fun cobwebLanding() {
|
||||
player.teleport(5.0, 12.0, 5.0)
|
||||
world.set(5, 10, 5, Blocks.COBWEB.defaultState)
|
||||
player.tick(10)
|
||||
storeMovement()
|
||||
storeVelocity()
|
||||
storeOnGround()
|
||||
}
|
||||
|
||||
@ExtractorMethod
|
||||
fun cobwebFalling() {
|
||||
player.teleport(5.0, 11.0, 5.0)
|
||||
world.set(5, 10, 5, Blocks.COBWEB.defaultState)
|
||||
player.tick(10)
|
||||
storeMovement()
|
||||
storeVelocity()
|
||||
storeOnGround()
|
||||
}
|
||||
|
||||
@ExtractorMethod
|
||||
fun cobwebForwardsMovement() {
|
||||
player.teleport(5.0, 11.0, 5.0)
|
||||
world.set(5, 10, 5, Blocks.COBWEB.defaultState)
|
||||
player.setKeys(forwards = true)
|
||||
player.tick(10)
|
||||
storeMovement()
|
||||
storeVelocity()
|
||||
storeOnGround()
|
||||
}
|
||||
|
||||
@ExtractorMethod
|
||||
fun cobwebSidewaysMovement1() {
|
||||
player.teleport(5.0, 11.0, 5.0)
|
||||
world.set(5, 10, 5, Blocks.COBWEB.defaultState)
|
||||
player.setKeys(left = true)
|
||||
player.tick(10)
|
||||
storeMovement()
|
||||
storeVelocity()
|
||||
storeOnGround()
|
||||
}
|
||||
|
||||
@ExtractorMethod
|
||||
fun cobwebSidewaysMovement2() {
|
||||
player.teleport(5.0, 11.0, 5.0)
|
||||
world.set(5, 10, 5, Blocks.COBWEB.defaultState)
|
||||
player.setKeys(right = true)
|
||||
player.tick(10)
|
||||
storeMovement()
|
||||
storeVelocity()
|
||||
storeOnGround()
|
||||
}
|
||||
|
||||
@ExtractorMethod
|
||||
fun cobwebCombinedMovement() {
|
||||
player.teleport(5.0, 11.0, 5.0)
|
||||
world.set(5, 10, 5, Blocks.COBWEB.defaultState)
|
||||
player.setKeys(forwards = true, right = true)
|
||||
player.tick(10)
|
||||
storeMovement()
|
||||
storeVelocity()
|
||||
storeOnGround()
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user