mirror of
https://gitlab.bixilon.de/bixilon/pixlyzer-physics.git
synced 2025-09-26 14:29:52 -04:00
abstract stone walk test
This commit is contained in:
parent
9f28ef959f
commit
5a52569250
@ -49,14 +49,18 @@ This [pixlyzer](https://gitlab.bixilon.de/bixilon/pixlyzer) module runs physics
|
||||
- climbing (e.g. ladders)
|
||||
- scaffolding
|
||||
- stepping (e.g. stairs)
|
||||
- bed/slime
|
||||
- honey
|
||||
- soul sand
|
||||
- fences
|
||||
- bouncing
|
||||
- bed
|
||||
- slime
|
||||
- slow movement
|
||||
- powder snow
|
||||
- sweet berry bush
|
||||
- cobweb
|
||||
- slippery movement
|
||||
- ice
|
||||
- vehicles
|
||||
- riding (e.g. horse, strider, ...)
|
||||
- jump strength
|
||||
|
@ -8,7 +8,7 @@ import de.bixilon.pixlyzer.physics.tests.enchantments.NoEnchantmentExtractor
|
||||
import de.bixilon.pixlyzer.physics.tests.enchantments.SoulSpeed2Extractor
|
||||
import de.bixilon.pixlyzer.physics.tests.enchantments.SoulSpeedExtractor
|
||||
import de.bixilon.pixlyzer.physics.tests.enchantments.SwiftSneakExtractor
|
||||
import de.bixilon.pixlyzer.physics.tests.ground.GroundWalk
|
||||
import de.bixilon.pixlyzer.physics.tests.blocks.walk.StoneWalk
|
||||
import de.bixilon.pixlyzer.physics.tests.input.*
|
||||
import de.bixilon.pixlyzer.physics.tests.packet.PacketReceiveExtractor
|
||||
import de.bixilon.pixlyzer.physics.tests.potion.*
|
||||
@ -26,7 +26,7 @@ object PhysicsExtractor {
|
||||
BiomeNoiseExtractor::class.java,
|
||||
CollisionExtractor::class.java,
|
||||
SpectatorExtractor::class.java,
|
||||
GroundWalk::class.java,
|
||||
StoneWalk::class.java,
|
||||
LevitationExtractor::class.java,
|
||||
SlowFallingExtractor::class.java,
|
||||
JumpExtractor::class.java,
|
||||
|
@ -1,27 +1,24 @@
|
||||
package de.bixilon.pixlyzer.physics.tests.ground
|
||||
package de.bixilon.pixlyzer.physics.tests.blocks.walk
|
||||
|
||||
import de.bixilon.pixlyzer.physics.abstractions.MinecraftWorld
|
||||
import de.bixilon.pixlyzer.physics.tests.AbstractTest
|
||||
import de.bixilon.pixlyzer.physics.tests.ExtractorMethod
|
||||
import net.minecraft.block.Blocks
|
||||
import de.bixilon.pixlyzer.physics.tests.AbstractExtractor
|
||||
import net.minecraft.block.BlockState
|
||||
|
||||
class GroundWalk : AbstractTest() {
|
||||
abstract class AbstractWalkExtractor(private val state: BlockState) : AbstractExtractor() {
|
||||
override fun createWorld(): MinecraftWorld {
|
||||
val world = super.createWorld()
|
||||
world.fill(-20, 0, -20, 20, 0, 20, Blocks.RED_WOOL.getDefaultState())
|
||||
world.fill(-20, 0, -20, 20, 0, 20, state)
|
||||
return world
|
||||
}
|
||||
|
||||
@ExtractorMethod("ground_walk_landing")
|
||||
fun landing() {
|
||||
protected fun landing() {
|
||||
player.teleport(6.0, 5.0, 6.0)
|
||||
player.tick(15)
|
||||
storePosition()
|
||||
storeVelocity()
|
||||
}
|
||||
|
||||
@ExtractorMethod("ground_walk_walking_1")
|
||||
fun walking1() {
|
||||
protected fun walking1() {
|
||||
player.teleport(6.0, 1.0, 6.0)
|
||||
player.setKeys(forwards = true)
|
||||
player.tick(2)
|
||||
@ -29,8 +26,7 @@ class GroundWalk : AbstractTest() {
|
||||
storeVelocity()
|
||||
}
|
||||
|
||||
@ExtractorMethod("ground_walk_walking_2")
|
||||
fun walking2() {
|
||||
protected fun walking2() {
|
||||
player.teleport(6.0, 1.0, 6.0)
|
||||
player.setKeys(forwards = true)
|
||||
player.tick(10)
|
||||
@ -38,8 +34,7 @@ class GroundWalk : AbstractTest() {
|
||||
storeVelocity()
|
||||
}
|
||||
|
||||
@ExtractorMethod("ground_walk_walking_3")
|
||||
fun walking3() {
|
||||
protected fun walking3() {
|
||||
player.teleport(6.0, 1.0, 6.0)
|
||||
player.setKeys(forwards = true)
|
||||
player.tick(50)
|
||||
@ -47,8 +42,7 @@ class GroundWalk : AbstractTest() {
|
||||
storeVelocity()
|
||||
}
|
||||
|
||||
@ExtractorMethod("ground_walk_walking_4")
|
||||
fun walking4() {
|
||||
protected fun walking4() {
|
||||
player.teleport(-6.0, 1.0, -6.0)
|
||||
player.setKeys(forwards = true)
|
||||
player.tick(10)
|
||||
@ -56,8 +50,7 @@ class GroundWalk : AbstractTest() {
|
||||
storeVelocity()
|
||||
}
|
||||
|
||||
@ExtractorMethod("ground_walk_walking_5")
|
||||
fun walking5() {
|
||||
protected fun walking5() {
|
||||
player.teleport(-6.0, 1.0, -6.0)
|
||||
player.setKeys(forwards = true)
|
||||
player.tick(50)
|
||||
@ -65,8 +58,7 @@ class GroundWalk : AbstractTest() {
|
||||
storeVelocity()
|
||||
}
|
||||
|
||||
@ExtractorMethod("ground_walk_walking_6")
|
||||
fun walking6() {
|
||||
protected fun walking6() {
|
||||
player.teleport(-6.0, 1.0, -6.0)
|
||||
player.setKeys(forwards = true)
|
||||
player.rotate(180.0, 0.0)
|
||||
@ -75,8 +67,7 @@ class GroundWalk : AbstractTest() {
|
||||
storeVelocity()
|
||||
}
|
||||
|
||||
@ExtractorMethod("ground_walk_walking_7")
|
||||
fun walking7() {
|
||||
protected fun walking7() {
|
||||
player.teleport(-6.0, 1.0, -6.0)
|
||||
player.setKeys(forwards = true)
|
||||
player.rotate(180.0, 0.0)
|
@ -0,0 +1,47 @@
|
||||
package de.bixilon.pixlyzer.physics.tests.blocks.walk
|
||||
|
||||
import de.bixilon.pixlyzer.physics.tests.ExtractorMethod
|
||||
import net.minecraft.block.Blocks
|
||||
|
||||
class StoneWalk : AbstractWalkExtractor(Blocks.STONE.defaultState) {
|
||||
|
||||
@ExtractorMethod
|
||||
fun stoneLanding() {
|
||||
super.landing()
|
||||
}
|
||||
|
||||
@ExtractorMethod
|
||||
fun stoneWalking1() {
|
||||
super.walking1()
|
||||
}
|
||||
|
||||
@ExtractorMethod
|
||||
fun stoneWalking2() {
|
||||
super.walking2()
|
||||
}
|
||||
|
||||
@ExtractorMethod
|
||||
fun stoneWalking3() {
|
||||
super.walking3()
|
||||
}
|
||||
|
||||
@ExtractorMethod
|
||||
fun stoneWalking4() {
|
||||
super.walking4()
|
||||
}
|
||||
|
||||
@ExtractorMethod
|
||||
fun stoneWalking5() {
|
||||
super.walking5()
|
||||
}
|
||||
|
||||
@ExtractorMethod
|
||||
fun stoneWalking6() {
|
||||
super.walking6()
|
||||
}
|
||||
|
||||
@ExtractorMethod
|
||||
fun stoneWalking7() {
|
||||
super.walking7()
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user