diff --git a/.github/scripts/generate-publish-matrix.sh b/.github/scripts/generate-publish-matrix.sh index 9e114ae1..d34a6f50 100755 --- a/.github/scripts/generate-publish-matrix.sh +++ b/.github/scripts/generate-publish-matrix.sh @@ -9,7 +9,6 @@ modrinth_forge_project_id=$5 IFS=',' read -r -a allowed_mod_loaders_array <<< "${allowed_mod_loaders//[\[\]\']/}" matrix_content="{\"include\":[" enabled_platforms=$(awk -F= '/enabled_platforms/{print $2}' gradle.properties | tr -d ' ') -minecraft_version=$(awk -F= '/minecraft_version/{print $2; exit}' gradle.properties | tr -d ' ') for platform in $(echo $enabled_platforms | tr ',' ' '); do if [[ " ${allowed_mod_loaders_array[@]} " =~ " ${platform} " ]]; then @@ -27,7 +26,7 @@ for platform in $(echo $enabled_platforms | tr ',' ' '); do modrinth_project_id="$modrinth_forge_project_id" fi - matrix_entry="{\"mod_loader\":\"$platform\",\"minecraft_version\":\"$minecraft_version\",\"supported_mod_loaders\":[$supported_mod_loaders],\"curseforge_project_id\":\"$curseforge_project_id\",\"modrinth_project_id\":\"$modrinth_project_id\"}," + matrix_entry="{\"mod_loader\":\"$platform\",\"supported_mod_loaders\":[$supported_mod_loaders],\"curseforge_project_id\":\"$curseforge_project_id\",\"modrinth_project_id\":\"$modrinth_project_id\"}," matrix_content+="$matrix_entry" fi done diff --git a/.github/workflows/publish-branch.yml b/.github/workflows/publish-branch.yml new file mode 100644 index 00000000..c9d3a966 --- /dev/null +++ b/.github/workflows/publish-branch.yml @@ -0,0 +1,123 @@ +name: "Publish branch" + +on: + workflow_call: + inputs: + mod_loaders: + description: 'List of mod loaders to be published' + required: true + type: string + branch: + description: "Branch to be published" + required: true + type: string + +jobs: + build: + runs-on: ubuntu-latest + name: Build ${{ inputs.branch }} + timeout-minutes: 30 + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + + steps: + - name: "Checkout repository" + uses: actions/checkout@v4 + with: + ref: ${{ inputs.branch }} + fetch-depth: 0 + + - name: "Parse gradle properties" + id: gradle-properties + run: ./.github/scripts/parse-gradle-properties.sh + + - name: "Parse changelog" + run: ./.github/scripts/parse-changelog.sh ${{ steps.gradle-properties.outputs.MOD_VERSION }} + + - name: "Create github release" + continue-on-error: true + uses: ncipollo/release-action@v1 + with: + skipIfReleaseExists: true + allowUpdates: true + omitNameDuringUpdate: true + omitBodyDuringUpdate: true + tag: mc${{ steps.gradle-properties.outputs.MINECRAFT_VERSION }}-${{ steps.gradle-properties.outputs.MOD_VERSION }} + commit: ${{ inputs.branch }} + name: ${{ steps.gradle-properties.outputs.MOD_NAME }} ${{ steps.gradle-properties.outputs.MOD_VERSION }} for Minecraft ${{ steps.gradle-properties.outputs.MINECRAFT_VERSION }} + bodyFile: RELEASE_CHANGELOG.md + + - name: "Set up JDK" + uses: actions/setup-java@v4 + with: + java-version: ${{ steps.gradle-properties.outputs.MOD_JAVA_VERSION }} + distribution: temurin + + - name: "Setup Gradle and run build" + uses: gradle/actions/setup-gradle@v3 + with: + cache-read-only: false + generate-job-summary: false + gradle-version: wrapper + arguments: build + + - name: "Upload Built JARs" + uses: actions/upload-artifact@v4 + with: + name: built-jars-${{ inputs.branch }} + if-no-files-found: error + path: | + ./**/build/libs/*[0-9].jar + + - name: "Generate matrix for the run job" + id: set-matrix + run: ./.github/scripts/generate-publish-matrix.sh "${{ inputs.mod_loaders }}" ${{ vars.CURSEFORGE_FABRIC_PROJECT_ID }} ${{ vars.CURSEFORGE_FORGE_PROJECT_ID }} ${{ vars.MODRINTH_FABRIC_PROJECT_ID }} ${{ vars.MODRINTH_FORGE_PROJECT_ID }} + + publish: + runs-on: ubuntu-latest + needs: build + name: Publish ${{ inputs.branch }} ${{ matrix.mod_loader }} + timeout-minutes: 10 + strategy: + fail-fast: false + matrix: ${{fromJson(needs.build.outputs.matrix)}} + + steps: + - name: "Checkout repository" + uses: actions/checkout@v4 + with: + ref: ${{ inputs.branch }} + fetch-depth: 0 + + - name: "Download Built JARs" + uses: actions/download-artifact@v4 + with: + name: built-jars-${{ inputs.branch }} + + - name: "Parse gradle properties" + id: gradle-properties + run: ./.github/scripts/parse-gradle-properties.sh + + - name: "Parse changelog" + run: ./.github/scripts/parse-changelog.sh ${{ steps.gradle-properties.outputs.MOD_VERSION }} + + - name: Publish ${{ matrix.mod_loader }} + uses: Kir-Antipov/mc-publish@v3.3.0 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + github-tag: mc${{ steps.gradle-properties.outputs.MINECRAFT_VERSION }}-${{ steps.gradle-properties.outputs.MOD_VERSION }} + github-commitish: ${{ steps.gradle-properties.outputs.MINECRAFT_VERSION }} + + #curseforge-id: ${{ matrix.curseforge_project_id }} + #curseforge-token: ${{ secrets.CURSEFORGE_RELEASE_TOKEN }} + + #modrinth-id: ${{ matrix.modrinth_project_id }} + #modrinth-token: ${{ secrets.MODRINTH_RELEASE_TOKEN }} + + name: ${{ steps.gradle-properties.outputs.MOD_NAME }} ${{ steps.gradle-properties.outputs.MOD_VERSION }} + version: ${{ matrix.mod_loader }}-mc${{ steps.gradle-properties.outputs.MINECRAFT_VERSION }}-${{ steps.gradle-properties.outputs.MOD_VERSION }} + loaders: ${{ join(matrix.supported_mod_loaders, ' ') }} + game-versions: "${{ steps.gradle-properties.outputs.MINECRAFT_VERSION }}\n${{ steps.gradle-properties.outputs.MIN_MINECRAFT_VERSION }}" + changelog-file: RELEASE_CHANGELOG.md + files: | + ${{ matrix.mod_loader }}/build/libs/*[0-9].jar diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index cc698e9d..d9762e71 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,116 +15,14 @@ on: type: string jobs: - build: - runs-on: ubuntu-latest - name: Build ${{ matrix.branch }} - timeout-minutes: 15 + publish: + name: "Publish" strategy: fail-fast: false matrix: branch: ${{ fromJson(inputs.branches) }} - outputs: - matrix: ${{ steps.set-matrix.outputs.matrix }} - - steps: - - name: "Checkout repository" - uses: actions/checkout@v4 - with: - ref: ${{ matrix.branch }} - fetch-depth: 0 - - - name: "Parse gradle properties" - id: gradle-properties - run: ./.github/scripts/parse-gradle-properties.sh - - - name: "Parse changelog" - run: ./.github/scripts/parse-changelog.sh ${{ steps.gradle-properties.outputs.MOD_VERSION }} - - - name: "Create github release" - continue-on-error: true - uses: ncipollo/release-action@v1 - with: - skipIfReleaseExists: true - allowUpdates: true - omitNameDuringUpdate: true - omitBodyDuringUpdate: true - tag: mc${{ steps.gradle-properties.outputs.MINECRAFT_VERSION }}-${{ steps.gradle-properties.outputs.MOD_VERSION }} - commit: ${{ matrix.branch }} - name: ${{ steps.gradle-properties.outputs.MOD_NAME }} ${{ steps.gradle-properties.outputs.MOD_VERSION }} for Minecraft ${{ steps.gradle-properties.outputs.MINECRAFT_VERSION }} - bodyFile: RELEASE_CHANGELOG.md - - - name: "Set up JDK" - uses: actions/setup-java@v4 - with: - java-version: ${{ steps.gradle-properties.outputs.MOD_JAVA_VERSION }} - distribution: temurin - - - name: "Setup Gradle and run build" - uses: gradle/actions/setup-gradle@v3 - with: - cache-read-only: false - generate-job-summary: false - gradle-version: wrapper - arguments: build - - - name: "Upload Built JARs" - uses: actions/upload-artifact@v4 - with: - name: built-jars - if-no-files-found: error - path: | - ./**/build/libs/*[0-9].jar - - - name: "Generate matrix for the run job" - id: set-matrix - run: ./.github/scripts/generate-publish-matrix.sh "${{ inputs.mod_loaders }}" ${{ vars.CURSEFORGE_FABRIC_PROJECT_ID }} ${{ vars.CURSEFORGE_FORGE_PROJECT_ID }} ${{ vars.MODRINTH_FABRIC_PROJECT_ID }} ${{ vars.MODRINTH_FORGE_PROJECT_ID }} - - publish: - runs-on: ubuntu-latest - needs: build - name: Publish ${{ matrix.mod_loader }} - timeout-minutes: 15 - strategy: - fail-fast: false - matrix: ${{fromJson(needs.build.outputs.matrix)}} - - steps: - - name: "Checkout repository" - uses: actions/checkout@v4 - with: - ref: ${{ matrix.minecraft_version }} - fetch-depth: 0 - - - name: "Download Built JARs" - uses: actions/download-artifact@v4 - with: - name: built-jars - - - name: "Parse gradle properties" - id: gradle-properties - run: ./.github/scripts/parse-gradle-properties.sh - - - name: "Parse changelog" - run: ./.github/scripts/parse-changelog.sh ${{ steps.gradle-properties.outputs.MOD_VERSION }} - - - name: Publish ${{ matrix.mod_loader }} - uses: Kir-Antipov/mc-publish@v3.3.0 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - github-tag: mc${{ steps.gradle-properties.outputs.MINECRAFT_VERSION }}-${{ steps.gradle-properties.outputs.MOD_VERSION }} - github-commitish: ${{ steps.gradle-properties.outputs.MINECRAFT_VERSION }} - - #curseforge-id: ${{ matrix.curseforge_project_id }} - #curseforge-token: ${{ secrets.CURSEFORGE_RELEASE_TOKEN }} - - #modrinth-id: ${{ matrix.modrinth_project_id }} - #modrinth-featured: true - #modrinth-token: ${{ secrets.MODRINTH_RELEASE_TOKEN }} - - name: ${{ steps.gradle-properties.outputs.MOD_NAME }} ${{ steps.gradle-properties.outputs.MOD_VERSION }} - version: ${{ matrix.mod_loader }}-mc${{ steps.gradle-properties.outputs.MINECRAFT_VERSION }}-${{ steps.gradle-properties.outputs.MOD_VERSION }} - loaders: ${{ join(matrix.supported_mod_loaders, ' ') }} - game-versions: "${{ steps.gradle-properties.outputs.MINECRAFT_VERSION }}\n${{ steps.gradle-properties.outputs.MIN_MINECRAFT_VERSION }}" - changelog-file: RELEASE_CHANGELOG.md - files: | - ${{ matrix.mod_loader }}/build/libs/*[0-9].jar + uses: ./.github/workflows/publish-branch.yml + with: + branch: ${{ matrix.branch }} + mod_loaders: ${{ inputs.mod_loaders }} + secrets: inherit \ No newline at end of file diff --git a/common/src/main/java/com/faboslav/friendsandfoes/common/entity/CopperGolemEntity.java b/common/src/main/java/com/faboslav/friendsandfoes/common/entity/CopperGolemEntity.java index f1bc2cfe..8478ae98 100644 --- a/common/src/main/java/com/faboslav/friendsandfoes/common/entity/CopperGolemEntity.java +++ b/common/src/main/java/com/faboslav/friendsandfoes/common/entity/CopperGolemEntity.java @@ -10,6 +10,7 @@ import com.faboslav.friendsandfoes.common.init.FriendsAndFoesMemoryModuleTypes; import com.faboslav.friendsandfoes.common.init.FriendsAndFoesSoundEvents; import com.faboslav.friendsandfoes.common.tag.FriendsAndFoesTags; +import com.faboslav.friendsandfoes.common.util.MovementUtil; import com.faboslav.friendsandfoes.common.util.particle.ParticleSpawner; import com.mojang.serialization.Dynamic; import net.minecraft.block.BlockState; @@ -496,7 +497,7 @@ public void tick() { if (this.isOxidized()) { this.applyEntitySnapshot(); - this.stopMovement(); + MovementUtil.stopMovement(this); return; } @@ -775,27 +776,6 @@ private void becomeEntity() { CopperGolemBrain.setPressButtonCooldown(this); } - public void stopMovement() { - this.getBrain().forget(MemoryModuleType.AVOID_TARGET); - this.getBrain().forget(MemoryModuleType.WALK_TARGET); - this.getBrain().forget(MemoryModuleType.LOOK_TARGET); - - this.getNavigation().setSpeed(0); - this.getNavigation().stop(); - this.getMoveControl().moveTo(this.getX(), this.getY(), this.getZ(), 0); - this.getMoveControl().tick(); - this.getLookControl().lookAt(this.getLookControl().getLookX(), this.getLookControl().getLookY(), this.getLookControl().getLookZ()); - this.getLookControl().lookAt(Vec3d.ZERO); - this.getLookControl().tick(); - - this.setJumping(false); - this.setMovementSpeed(0.0F); - this.prevHorizontalSpeed = 0.0F; - this.horizontalSpeed = 0.0F; - this.sidewaysSpeed = 0.0F; - this.upwardSpeed = 0.0F; - } - public boolean isWaxed() { return this.dataTracker.get(IS_WAXED); } diff --git a/common/src/main/java/com/faboslav/friendsandfoes/common/entity/GlareEntity.java b/common/src/main/java/com/faboslav/friendsandfoes/common/entity/GlareEntity.java index 7e081c52..03101aef 100644 --- a/common/src/main/java/com/faboslav/friendsandfoes/common/entity/GlareEntity.java +++ b/common/src/main/java/com/faboslav/friendsandfoes/common/entity/GlareEntity.java @@ -10,6 +10,7 @@ import com.faboslav.friendsandfoes.common.init.FriendsAndFoesMemoryModuleTypes; import com.faboslav.friendsandfoes.common.init.FriendsAndFoesSoundEvents; import com.faboslav.friendsandfoes.common.tag.FriendsAndFoesTags; +import com.faboslav.friendsandfoes.common.util.MovementUtil; import com.faboslav.friendsandfoes.common.util.RandomGenerator; import com.faboslav.friendsandfoes.common.util.particle.ParticleSpawner; import com.mojang.serialization.Dynamic; @@ -444,7 +445,7 @@ public ActionResult interactMob( this.setSitting(!this.isSitting()); if (this.isSitting()) { - this.stopMovement(); + MovementUtil.stopMovement(this); } return ActionResult.SUCCESS; @@ -519,27 +520,6 @@ public void setSitting(boolean isSitting) { super.setInSittingPose(isSitting); } - public void stopMovement() { - this.getBrain().forget(MemoryModuleType.AVOID_TARGET); - this.getBrain().forget(MemoryModuleType.WALK_TARGET); - this.getBrain().forget(MemoryModuleType.LOOK_TARGET); - - this.getNavigation().setSpeed(0); - this.getNavigation().stop(); - this.getMoveControl().moveTo(this.getX(), this.getY(), this.getZ(), 0); - this.getMoveControl().tick(); - this.getLookControl().lookAt(this.getLookControl().getLookX(), this.getLookControl().getLookY(), this.getLookControl().getLookZ()); - this.getLookControl().lookAt(Vec3d.ZERO); - this.getLookControl().tick(); - - this.setJumping(false); - this.setMovementSpeed(0.0F); - this.prevHorizontalSpeed = 0.0F; - this.horizontalSpeed = 0.0F; - this.sidewaysSpeed = 0.0F; - this.upwardSpeed = 0.0F; - } - @Nullable public GlobalPos getGlowBerriesPos() { return this.getBrain().getOptionalMemory(FriendsAndFoesMemoryModuleTypes.GLARE_GLOW_BERRIES_POS.get()).orElse(null); diff --git a/common/src/main/java/com/faboslav/friendsandfoes/common/entity/TuffGolemEntity.java b/common/src/main/java/com/faboslav/friendsandfoes/common/entity/TuffGolemEntity.java index 204fe8f3..072c1727 100644 --- a/common/src/main/java/com/faboslav/friendsandfoes/common/entity/TuffGolemEntity.java +++ b/common/src/main/java/com/faboslav/friendsandfoes/common/entity/TuffGolemEntity.java @@ -8,6 +8,7 @@ import com.faboslav.friendsandfoes.common.entity.animation.AnimatedEntity; import com.faboslav.friendsandfoes.common.entity.pose.TuffGolemEntityPose; import com.faboslav.friendsandfoes.common.init.FriendsAndFoesSoundEvents; +import com.faboslav.friendsandfoes.common.util.MovementUtil; import com.faboslav.friendsandfoes.common.util.particle.ParticleSpawner; import com.mojang.serialization.Dynamic; import net.minecraft.block.Block; @@ -439,7 +440,7 @@ private boolean tryToInteractMobWithItem( return false; } - this.stopMovement(); + MovementUtil.stopMovement(this); if (this.isHoldingItem()) { if (!player.getAbilities().creativeMode) { @@ -822,23 +823,6 @@ public void setSpawnYaw(float yaw) { this.setHeadYaw(yaw); } - public void stopMovement() { - this.getNavigation().setSpeed(0); - this.getNavigation().stop(); - this.getMoveControl().moveTo(this.getX(), this.getY(), this.getZ(), 0); - this.getMoveControl().tick(); - this.getLookControl().lookAt(this.getLookControl().getLookX(), this.getLookControl().getLookY(), this.getLookControl().getLookZ()); - this.getLookControl().lookAt(Vec3d.ZERO); - this.getLookControl().tick(); - - this.setJumping(false); - this.setMovementSpeed(0.0F); - this.prevHorizontalSpeed = 0.0F; - this.horizontalSpeed = 0.0F; - this.sidewaysSpeed = 0.0F; - this.upwardSpeed = 0.0F; - } - public enum Color { RED("red"), diff --git a/common/src/main/java/com/faboslav/friendsandfoes/common/entity/ai/brain/task/crab/CrabDanceTask.java b/common/src/main/java/com/faboslav/friendsandfoes/common/entity/ai/brain/task/crab/CrabDanceTask.java index 1ca7789f..b4f51bf4 100644 --- a/common/src/main/java/com/faboslav/friendsandfoes/common/entity/ai/brain/task/crab/CrabDanceTask.java +++ b/common/src/main/java/com/faboslav/friendsandfoes/common/entity/ai/brain/task/crab/CrabDanceTask.java @@ -4,6 +4,7 @@ import com.faboslav.friendsandfoes.common.entity.CrabEntity; import com.faboslav.friendsandfoes.common.entity.pose.CrabEntityPose; import com.faboslav.friendsandfoes.common.init.FriendsAndFoesMemoryModuleTypes; +import com.faboslav.friendsandfoes.common.util.MovementUtil; import net.minecraft.entity.ai.brain.MemoryModuleState; import net.minecraft.entity.ai.brain.MemoryModuleType; import net.minecraft.entity.ai.brain.task.Task; @@ -35,20 +36,7 @@ protected boolean shouldRun(ServerWorld world, CrabEntity crab) { @Override protected void run(ServerWorld world, CrabEntity crab, long time) { - crab.getBrain().forget(MemoryModuleType.WALK_TARGET); - crab.getNavigation().setSpeed(0); - crab.getNavigation().stop(); - crab.getNavigation().tick(); - crab.getMoveControl().tick(); - - crab.setMovementSpeed(0.0F); - crab.prevHorizontalSpeed = 0.0F; - crab.horizontalSpeed = 0.0F; - crab.sidewaysSpeed = 0.0F; - crab.upwardSpeed = 0.0F; - - crab.getLookControl().tick(); - + MovementUtil.stopMovement(crab); crab.startDanceAnimation(); } diff --git a/common/src/main/java/com/faboslav/friendsandfoes/common/entity/ai/brain/task/tuffgolem/TuffGolemGoToHomePositionTask.java b/common/src/main/java/com/faboslav/friendsandfoes/common/entity/ai/brain/task/tuffgolem/TuffGolemGoToHomePositionTask.java index ed17f790..6866595e 100644 --- a/common/src/main/java/com/faboslav/friendsandfoes/common/entity/ai/brain/task/tuffgolem/TuffGolemGoToHomePositionTask.java +++ b/common/src/main/java/com/faboslav/friendsandfoes/common/entity/ai/brain/task/tuffgolem/TuffGolemGoToHomePositionTask.java @@ -2,6 +2,7 @@ import com.faboslav.friendsandfoes.common.entity.TuffGolemEntity; import com.faboslav.friendsandfoes.common.init.FriendsAndFoesMemoryModuleTypes; +import com.faboslav.friendsandfoes.common.util.MovementUtil; import com.google.common.collect.ImmutableMap; import net.minecraft.entity.ai.brain.MemoryModuleState; import net.minecraft.entity.ai.brain.MemoryModuleType; @@ -97,7 +98,7 @@ protected void finishRunning( tuffGolem.getBrain().forget(MemoryModuleType.LOOK_TARGET); tuffGolem.getBrain().forget(MemoryModuleType.WALK_TARGET); - tuffGolem.stopMovement(); + MovementUtil.stopMovement(tuffGolem); } private void walkTowardsHomePos( diff --git a/common/src/main/java/com/faboslav/friendsandfoes/common/entity/ai/brain/task/tuffgolem/TuffGolemSleepTask.java b/common/src/main/java/com/faboslav/friendsandfoes/common/entity/ai/brain/task/tuffgolem/TuffGolemSleepTask.java index c0c85f3e..d6eec6dd 100644 --- a/common/src/main/java/com/faboslav/friendsandfoes/common/entity/ai/brain/task/tuffgolem/TuffGolemSleepTask.java +++ b/common/src/main/java/com/faboslav/friendsandfoes/common/entity/ai/brain/task/tuffgolem/TuffGolemSleepTask.java @@ -4,6 +4,7 @@ import com.faboslav.friendsandfoes.common.entity.ai.brain.TuffGolemBrain; import com.faboslav.friendsandfoes.common.entity.pose.TuffGolemEntityPose; import com.faboslav.friendsandfoes.common.init.FriendsAndFoesMemoryModuleTypes; +import com.faboslav.friendsandfoes.common.util.MovementUtil; import com.google.common.collect.ImmutableMap; import net.minecraft.entity.ai.brain.MemoryModuleState; import net.minecraft.entity.ai.brain.task.Task; @@ -62,7 +63,7 @@ protected void finishRunning( long time ) { TuffGolemBrain.setSleepCooldown(tuffGolem); - tuffGolem.stopMovement(); + MovementUtil.stopMovement(tuffGolem); if (tuffGolem.isInPose(TuffGolemEntityPose.SLEEPING.get())) { tuffGolem.startStanding(); diff --git a/common/src/main/java/com/faboslav/friendsandfoes/common/util/MovementUtil.java b/common/src/main/java/com/faboslav/friendsandfoes/common/util/MovementUtil.java new file mode 100644 index 00000000..e298fe06 --- /dev/null +++ b/common/src/main/java/com/faboslav/friendsandfoes/common/util/MovementUtil.java @@ -0,0 +1,29 @@ +package com.faboslav.friendsandfoes.common.util; + +import net.minecraft.entity.ai.brain.MemoryModuleType; +import net.minecraft.entity.mob.MobEntity; +import net.minecraft.util.math.Vec3d; + +public final class MovementUtil +{ + public static void stopMovement(MobEntity entity) { + entity.getBrain().forget(MemoryModuleType.AVOID_TARGET); + entity.getBrain().forget(MemoryModuleType.WALK_TARGET); + entity.getBrain().forget(MemoryModuleType.LOOK_TARGET); + + entity.getNavigation().setSpeed(0); + entity.getNavigation().stop(); + entity.getMoveControl().moveTo(entity.getX(), entity.getY(), entity.getZ(), 0); + entity.getMoveControl().tick(); + entity.getLookControl().lookAt(entity.getLookControl().getLookX(), entity.getLookControl().getLookY(), entity.getLookControl().getLookZ()); + entity.getLookControl().lookAt(Vec3d.ZERO); + entity.getLookControl().tick(); + + entity.setJumping(false); + entity.setMovementSpeed(0.0F); + entity.prevHorizontalSpeed = 0.0F; + entity.horizontalSpeed = 0.0F; + entity.sidewaysSpeed = 0.0F; + entity.upwardSpeed = 0.0F; + } +}