Continue mapping migration
This commit is contained in:
parent
99ade39404
commit
f03fd03bd0
499 changed files with 12567 additions and 12723 deletions
|
@ -1,7 +1,6 @@
|
|||
package ru.betterend.world.features;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
@ -13,7 +12,7 @@ public abstract class SkyScatterFeature extends ScatterFeature {
|
|||
public SkyScatterFeature(int radius) {
|
||||
super(radius);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected int getChance() {
|
||||
return 10;
|
||||
|
@ -21,32 +20,32 @@ public abstract class SkyScatterFeature extends ScatterFeature {
|
|||
|
||||
@Override
|
||||
public boolean canGenerate(WorldGenLevel world, Random random, BlockPos center, BlockPos blockPos, float radius) {
|
||||
if (!world.isAir(blockPos)) {
|
||||
if (!world.isEmptyBlock(blockPos)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (Direction dir : BlocksHelper.HORIZONTAL) {
|
||||
if (!world.isAir(blockPos.offset(dir))) {
|
||||
|
||||
for (Direction dir: BlocksHelper.HORIZONTAL) {
|
||||
if (!world.isEmptyBlock(blockPos.relative(dir))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int maxD = getYOffset() + 2;
|
||||
int maxV = getYOffset() - 2;
|
||||
|
||||
|
||||
return BlocksHelper.upRay(world, blockPos, maxD) > maxV && BlocksHelper.downRay(world, blockPos, maxD) > maxV;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected boolean canSpawn(WorldGenLevel world, BlockPos pos) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected BlockPos getCenterGround(WorldGenLevel world, BlockPos pos) {
|
||||
return new BlockPos(pos.getX(), MHelper.randRange(32, 192, world.getRandom()), pos.getZ());
|
||||
}
|
||||
|
||||
|
||||
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