mirror of
https://github.com/Pumpkin-MC/Pumpkin.git
synced 2026-08-31 08:22:33 +00:00
fix(block): correct berry bush and nether wart growth rates (#2621)
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user