mirror of
https://gitlab.bixilon.de/bixilon/pixlyzer-physics.git
synced 2025-09-27 06:50:41 -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)
|
- climbing (e.g. ladders)
|
||||||
- scaffolding
|
- scaffolding
|
||||||
- stepping (e.g. stairs)
|
- stepping (e.g. stairs)
|
||||||
- bed/slime
|
|
||||||
- honey
|
- honey
|
||||||
- soul sand
|
- soul sand
|
||||||
- fences
|
- fences
|
||||||
|
- bouncing
|
||||||
|
- bed
|
||||||
|
- slime
|
||||||
- slow movement
|
- slow movement
|
||||||
- powder snow
|
- powder snow
|
||||||
- sweet berry bush
|
- sweet berry bush
|
||||||
- cobweb
|
- cobweb
|
||||||
|
- slippery movement
|
||||||
|
- ice
|
||||||
- vehicles
|
- vehicles
|
||||||
- riding (e.g. horse, strider, ...)
|
- riding (e.g. horse, strider, ...)
|
||||||
- jump strength
|
- 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.SoulSpeed2Extractor
|
||||||
import de.bixilon.pixlyzer.physics.tests.enchantments.SoulSpeedExtractor
|
import de.bixilon.pixlyzer.physics.tests.enchantments.SoulSpeedExtractor
|
||||||
import de.bixilon.pixlyzer.physics.tests.enchantments.SwiftSneakExtractor
|
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.input.*
|
||||||
import de.bixilon.pixlyzer.physics.tests.packet.PacketReceiveExtractor
|
import de.bixilon.pixlyzer.physics.tests.packet.PacketReceiveExtractor
|
||||||
import de.bixilon.pixlyzer.physics.tests.potion.*
|
import de.bixilon.pixlyzer.physics.tests.potion.*
|
||||||
@ -26,7 +26,7 @@ object PhysicsExtractor {
|
|||||||
BiomeNoiseExtractor::class.java,
|
BiomeNoiseExtractor::class.java,
|
||||||
CollisionExtractor::class.java,
|
CollisionExtractor::class.java,
|
||||||
SpectatorExtractor::class.java,
|
SpectatorExtractor::class.java,
|
||||||
GroundWalk::class.java,
|
StoneWalk::class.java,
|
||||||
LevitationExtractor::class.java,
|
LevitationExtractor::class.java,
|
||||||
SlowFallingExtractor::class.java,
|
SlowFallingExtractor::class.java,
|
||||||
JumpExtractor::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.abstractions.MinecraftWorld
|
||||||
import de.bixilon.pixlyzer.physics.tests.AbstractTest
|
import de.bixilon.pixlyzer.physics.tests.AbstractExtractor
|
||||||
import de.bixilon.pixlyzer.physics.tests.ExtractorMethod
|
import net.minecraft.block.BlockState
|
||||||
import net.minecraft.block.Blocks
|
|
||||||
|
|
||||||
class GroundWalk : AbstractTest() {
|
abstract class AbstractWalkExtractor(private val state: BlockState) : AbstractExtractor() {
|
||||||
override fun createWorld(): MinecraftWorld {
|
override fun createWorld(): MinecraftWorld {
|
||||||
val world = super.createWorld()
|
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
|
return world
|
||||||
}
|
}
|
||||||
|
|
||||||
@ExtractorMethod("ground_walk_landing")
|
protected fun landing() {
|
||||||
fun landing() {
|
|
||||||
player.teleport(6.0, 5.0, 6.0)
|
player.teleport(6.0, 5.0, 6.0)
|
||||||
player.tick(15)
|
player.tick(15)
|
||||||
storePosition()
|
storePosition()
|
||||||
storeVelocity()
|
storeVelocity()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ExtractorMethod("ground_walk_walking_1")
|
protected fun walking1() {
|
||||||
fun walking1() {
|
|
||||||
player.teleport(6.0, 1.0, 6.0)
|
player.teleport(6.0, 1.0, 6.0)
|
||||||
player.setKeys(forwards = true)
|
player.setKeys(forwards = true)
|
||||||
player.tick(2)
|
player.tick(2)
|
||||||
@ -29,8 +26,7 @@ class GroundWalk : AbstractTest() {
|
|||||||
storeVelocity()
|
storeVelocity()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ExtractorMethod("ground_walk_walking_2")
|
protected fun walking2() {
|
||||||
fun walking2() {
|
|
||||||
player.teleport(6.0, 1.0, 6.0)
|
player.teleport(6.0, 1.0, 6.0)
|
||||||
player.setKeys(forwards = true)
|
player.setKeys(forwards = true)
|
||||||
player.tick(10)
|
player.tick(10)
|
||||||
@ -38,8 +34,7 @@ class GroundWalk : AbstractTest() {
|
|||||||
storeVelocity()
|
storeVelocity()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ExtractorMethod("ground_walk_walking_3")
|
protected fun walking3() {
|
||||||
fun walking3() {
|
|
||||||
player.teleport(6.0, 1.0, 6.0)
|
player.teleport(6.0, 1.0, 6.0)
|
||||||
player.setKeys(forwards = true)
|
player.setKeys(forwards = true)
|
||||||
player.tick(50)
|
player.tick(50)
|
||||||
@ -47,8 +42,7 @@ class GroundWalk : AbstractTest() {
|
|||||||
storeVelocity()
|
storeVelocity()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ExtractorMethod("ground_walk_walking_4")
|
protected fun walking4() {
|
||||||
fun walking4() {
|
|
||||||
player.teleport(-6.0, 1.0, -6.0)
|
player.teleport(-6.0, 1.0, -6.0)
|
||||||
player.setKeys(forwards = true)
|
player.setKeys(forwards = true)
|
||||||
player.tick(10)
|
player.tick(10)
|
||||||
@ -56,8 +50,7 @@ class GroundWalk : AbstractTest() {
|
|||||||
storeVelocity()
|
storeVelocity()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ExtractorMethod("ground_walk_walking_5")
|
protected fun walking5() {
|
||||||
fun walking5() {
|
|
||||||
player.teleport(-6.0, 1.0, -6.0)
|
player.teleport(-6.0, 1.0, -6.0)
|
||||||
player.setKeys(forwards = true)
|
player.setKeys(forwards = true)
|
||||||
player.tick(50)
|
player.tick(50)
|
||||||
@ -65,8 +58,7 @@ class GroundWalk : AbstractTest() {
|
|||||||
storeVelocity()
|
storeVelocity()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ExtractorMethod("ground_walk_walking_6")
|
protected fun walking6() {
|
||||||
fun walking6() {
|
|
||||||
player.teleport(-6.0, 1.0, -6.0)
|
player.teleport(-6.0, 1.0, -6.0)
|
||||||
player.setKeys(forwards = true)
|
player.setKeys(forwards = true)
|
||||||
player.rotate(180.0, 0.0)
|
player.rotate(180.0, 0.0)
|
||||||
@ -75,8 +67,7 @@ class GroundWalk : AbstractTest() {
|
|||||||
storeVelocity()
|
storeVelocity()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ExtractorMethod("ground_walk_walking_7")
|
protected fun walking7() {
|
||||||
fun walking7() {
|
|
||||||
player.teleport(-6.0, 1.0, -6.0)
|
player.teleport(-6.0, 1.0, -6.0)
|
||||||
player.setKeys(forwards = true)
|
player.setKeys(forwards = true)
|
||||||
player.rotate(180.0, 0.0)
|
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