fix(block): correct berry bush and nether wart growth rates (#2621)

This commit is contained in:
Colin
2026-07-31 07:13:57 +02:00
committed by GitHub
parent 3190f9ea72
commit bc61503db0
2 changed files with 8 additions and 10 deletions

View File

@@ -82,7 +82,7 @@ impl CropBlockBase for NetherWartBlock {
async fn random_tick(&self, world: &Arc<World>, pos: &BlockPos) {
let (block, state) = world.get_block_and_state_id(pos);
let age = self.get_age(state, block);
if age < self.max_age() && rand::rng().random_range(0..=10) == 0 {
if age < self.max_age() && rand::rng().random_range(0..10) == 0 {
world
.set_block_state(
pos,

View File

@@ -188,15 +188,13 @@ impl CropBlockBase for SweetBerryBushBlock {
if state_above.is_full_cube() || state_above.is_solid() {
return;
}
if rand::rng().random_range(0..=25) == 0 {
world
.set_block_state(
pos,
self.state_with_age(block, state, age + 1),
BlockFlags::NOTIFY_NEIGHBORS,
)
.await;
}
world
.set_block_state(
pos,
self.state_with_age(block, state, age + 1),
BlockFlags::NOTIFY_NEIGHBORS,
)
.await;
}
}
}