this was because of the light level not being checked, now there are too few mushrooms but i think still better
This commit is contained in:
1 parent
60d83022be
commit
6ea5da408a
2 files changed
+6
-9
No files matched your search
@@ -32,9 +32,9 @@ impl RandomPatchFeature {
|
||||
random: &mut RandomGenerator,
|
||||
pos: BlockPos,
|
||||
) -> bool {
|
||||
let mut i = 0;
|
||||
let xz = self.xz_spread as i32 + 1;
|
||||
let y = self.y_spread as i32 + 1;
|
||||
let mut is_some = false;
|
||||
for _ in 0..self.tries {
|
||||
let pos = Vector3::new(
|
||||
pos.0.x + random.next_bounded_i32(xz) - random.next_bounded_i32(xz),
|
||||
@@ -55,8 +55,8 @@ impl RandomPatchFeature {
|
||||
{
|
||||
continue;
|
||||
}
|
||||
i += 1;
|
||||
is_some = true
|
||||
}
|
||||
i > 0
|
||||
is_some
|
||||
}
|
||||
}
|
||||
@@ -18,17 +18,14 @@ impl BlockMetadata for MushroomPlantBlock {
|
||||
#[async_trait]
|
||||
impl PumpkinBlock for MushroomPlantBlock {
|
||||
async fn can_place_at(&self, args: CanPlaceAtArgs<'_>) -> bool {
|
||||
let (block_below, state) = args
|
||||
.block_accessor
|
||||
.get_block_and_block_state(&args.position.down())
|
||||
.await;
|
||||
let block_below = args.block_accessor.get_block(&args.position.down()).await;
|
||||
if block_below
|
||||
.is_tagged_with("minecraft:mushroom_grow_block")
|
||||
.unwrap()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
// TODO
|
||||
state.is_full_cube()
|
||||
// TODO: Check light level and isOpaqueFullCube
|
||||
false
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user