From 79cce45b6ffcee407238bf4e49ca2b71632c4644 Mon Sep 17 00:00:00 2001 From: Shynixn Date: Fri, 19 Dec 2025 12:55:26 +0100 Subject: [PATCH] #678 Moved stuck detection to minecraft thread. --- build.gradle.kts | 2 +- .../petblocks/impl/physic/MathComponent.kt | 22 +++++++++---------- src/main/resources/plugin-folia.yml | 2 +- src/main/resources/plugin-legacy.yml | 2 +- src/main/resources/plugin.yml | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index e4e91d987..140e6f5cf 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ plugins { } group = "com.github.shynixn" -version = "9.29.0" +version = "9.29.1" repositories { mavenLocal() diff --git a/src/main/java/com/github/shynixn/petblocks/impl/physic/MathComponent.kt b/src/main/java/com/github/shynixn/petblocks/impl/physic/MathComponent.kt index 6c290cd1d..d92b4cd4b 100644 --- a/src/main/java/com/github/shynixn/petblocks/impl/physic/MathComponent.kt +++ b/src/main/java/com/github/shynixn/petblocks/impl/physic/MathComponent.kt @@ -75,17 +75,6 @@ class MathComponent( if (motion.x != 0.0 || motion.z != 0.0) { movementRayTraceResult = rayTracingService.rayTraceMotion(position, motion, settings.collideWithWater, settings.collideWithPassableBlocks) } - } - - /** - * Ticks the async thread. - */ - fun tickPhysic() { - // Handle teleport. - if (cachedTeleportTarget != null) { - handleTeleport() - return - } if (movementRayTraceResult != null) { if (movementRayTraceResult!!.hitBlock && movementRayTraceResult!!.blockDirection != BlockDirection.UP) { @@ -119,6 +108,17 @@ class MathComponent( } } } + } + + /** + * Ticks the async thread. + */ + fun tickPhysic() { + // Handle teleport. + if (cachedTeleportTarget != null) { + handleTeleport() + return + } if (gravityRayTraceResult != null) { if (!gravityRayTraceResult!!.hitBlock || motion.y > 0.0) { diff --git a/src/main/resources/plugin-folia.yml b/src/main/resources/plugin-folia.yml index 0f96a452e..38273da16 100644 --- a/src/main/resources/plugin-folia.yml +++ b/src/main/resources/plugin-folia.yml @@ -1,5 +1,5 @@ name: PetBlocks -version: 9.29.0 +version: 9.29.1 author: Shynixn main: com.github.shynixn.petblocks.PetBlocksPlugin softdepend: [ PlaceholderAPI, HeadDatabase] diff --git a/src/main/resources/plugin-legacy.yml b/src/main/resources/plugin-legacy.yml index cc3822b6f..a8e9cf8ff 100644 --- a/src/main/resources/plugin-legacy.yml +++ b/src/main/resources/plugin-legacy.yml @@ -1,5 +1,5 @@ name: PetBlocks -version: 9.29.0 +version: 9.29.1 author: Shynixn main: com.github.shynixn.petblocks.PetBlocksPlugin softdepend: [ PlaceholderAPI, HeadDatabase] diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 39aa21fc6..55992cdf1 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,5 +1,5 @@ name: PetBlocks -version: 9.29.0 +version: 9.29.1 author: Shynixn main: com.github.shynixn.petblocks.PetBlocksPlugin softdepend: [ PlaceholderAPI, HeadDatabase]