From 74beb9738a31f8347de607dced37a6cabb374c83 Mon Sep 17 00:00:00 2001 From: Alexander Medvedev Date: Mon, 22 Jun 2026 19:28:25 +0200 Subject: [PATCH] fix: https://github.com/Pumpkin-MC/Pumpkin/issues/2276 --- .github/workflows/rust.yml | 7 ++++--- pumpkin/src/entity/mob/slime.rs | 31 ++++++++++++++++--------------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index ccbbd0e42..189d7b8e3 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -127,10 +127,11 @@ jobs: - uses: Swatinem/rust-cache@v2 - name: Build Release shell: bash + # Removed this because this it seems not worth the hussle + # if [[ "${{ runner.arch }}" == "X64" ]]; then + # export RUSTFLAGS="$RUSTFLAGS -C target-cpu=x86-64-v3" + # fi run: | - if [[ "${{ runner.arch }}" == "X64" ]]; then - export RUSTFLAGS="$RUSTFLAGS -C target-cpu=x86-64-v3" - fi cargo build --verbose --release - name: Prepare artifacts shell: bash diff --git a/pumpkin/src/entity/mob/slime.rs b/pumpkin/src/entity/mob/slime.rs index 9e975313d..c35aa777e 100644 --- a/pumpkin/src/entity/mob/slime.rs +++ b/pumpkin/src/entity/mob/slime.rs @@ -152,21 +152,22 @@ impl SlimeEntity { // For now, we assume natural spawning as that's what we are implementing. // Swamp/Surface Spawning - let biome = world.get_biome(pos); - if biome.has_tag(&pumpkin_data::tag::WorldgenBiome::MINECRAFT_ALLOWS_SURFACE_SLIME_SPAWNS) - && pos.0.y > 50 - && pos.0.y < 70 - { - let time = world.level_time.blocking_lock().time_of_day; - let moon_phase = (time / 24000) % 8; - let surface_slime_spawn_chance = Self::get_spawn_chance(moon_phase); - let mut rng = rand::rng(); - if rng.random::() < surface_slime_spawn_chance - && world.get_max_local_raw_brightness(pos) <= rng.random_range(0..8) - { - return true; - } - } + // TOOD: fix + // let biome = world.get_biome(pos); + // if biome.has_tag(&pumpkin_data::tag::WorldgenBiome::MINECRAFT_ALLOWS_SURFACE_SLIME_SPAWNS) + // && pos.0.y > 50 + // && pos.0.y < 70 + // { + // let time = world.level_time.lock().await.time_of_day; + // let moon_phase = (time / 24000) % 8; + // let surface_slime_spawn_chance = Self::get_spawn_chance(moon_phase); + // let mut rng = rand::rng(); + // if rng.random::() < surface_slime_spawn_chance + // && world.get_max_local_raw_brightness(pos) <= rng.random_range(0..8) + // { + // return true; + // } + // } // Slime Chunk Spawning let chunk_pos = pos.chunk_position();