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.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.StructureWorldAccess;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import ru.betterend.util.BlocksHelper;
|
||||
import ru.betterend.util.MHelper;
|
||||
|
||||
|
@ -20,8 +20,7 @@ public abstract class SkyScatterFeature extends ScatterFeature {
|
|||
}
|
||||
|
||||
@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) {
|
||||
if (!world.isAir(blockPos)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -39,16 +38,16 @@ public abstract class SkyScatterFeature extends ScatterFeature {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected boolean canSpawn(StructureWorldAccess world, BlockPos pos) {
|
||||
protected boolean canSpawn(WorldGenLevel world, BlockPos pos) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockPos getCenterGround(StructureWorldAccess world, BlockPos pos) {
|
||||
protected BlockPos getCenterGround(WorldGenLevel world, BlockPos pos) {
|
||||
return new BlockPos(pos.getX(), MHelper.randRange(32, 192, world.getRandom()), pos.getZ());
|
||||
}
|
||||
|
||||
protected boolean getGroundPlant(StructureWorldAccess world, MutableBlockPos pos) {
|
||||
protected boolean getGroundPlant(WorldGenLevel world, MutableBlockPos pos) {
|
||||
pos.setY(pos.getY() + MHelper.randRange(-getYOffset(), getYOffset(), world.getRandom()));
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue