Continue migration
This commit is contained in:
parent
47ed597358
commit
33dbfbe633
263 changed files with 1450 additions and 1486 deletions
|
@ -5,7 +5,7 @@ import java.util.Random;
|
|||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.StructureWorldAccess;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import ru.betterend.blocks.basis.DoublePlantBlock;
|
||||
import ru.betterend.util.BlocksHelper;
|
||||
|
||||
|
@ -18,13 +18,12 @@ public class UnderwaterPlantFeature extends UnderwaterPlantScatter {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canGenerate(StructureWorldAccess world, Random random, BlockPos center, BlockPos blockPos,
|
||||
float radius) {
|
||||
public boolean canGenerate(WorldGenLevel world, Random random, BlockPos center, BlockPos blockPos, float radius) {
|
||||
return super.canSpawn(world, blockPos) && plant.canPlaceAt(plant.defaultBlockState(), world, blockPos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate(StructureWorldAccess world, Random random, BlockPos blockPos) {
|
||||
public void place(WorldGenLevel world, Random random, BlockPos blockPos) {
|
||||
if (plant instanceof DoublePlantBlock) {
|
||||
int rot = random.nextInt(4);
|
||||
BlockState state = plant.defaultBlockState().with(DoublePlantBlock.ROTATION, rot);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue