Cleanup
This commit is contained in:
parent
42f8754912
commit
a51470210e
19 changed files with 0 additions and 880 deletions
|
@ -1,27 +0,0 @@
|
|||
package ru.betterend.world.features;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import ru.bclib.util.BlocksHelper;
|
||||
|
||||
public class CavePlantFeature extends FullHeightScatterFeature {
|
||||
private final Block plant;
|
||||
|
||||
public CavePlantFeature(Block plant, int radius) {
|
||||
super(radius);
|
||||
this.plant = plant;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canGenerate(WorldGenLevel world, Random random, BlockPos center, BlockPos blockPos, float radius) {
|
||||
return plant.canSurvive(world.getBlockState(blockPos), world, blockPos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate(WorldGenLevel world, Random random, BlockPos blockPos) {
|
||||
BlocksHelper.setWithoutUpdate(world, blockPos, plant);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue