More fixes
This commit is contained in:
parent
f76ca1144d
commit
fd093318c6
2 changed files with 9 additions and 2 deletions
|
@ -43,7 +43,12 @@ public class CrashedShipFeature extends NBTStructureFeature {
|
|||
|
||||
@Override
|
||||
protected boolean canSpawn(StructureWorldAccess world, BlockPos pos, Random random) {
|
||||
return pos.getY() > 58 && world.getBlockState(pos.down()).isIn(EndTags.GEN_TERRAIN);
|
||||
long x = pos.getX() >> 4;
|
||||
long z = pos.getX() >> 4;
|
||||
if (x * x + z * z < 3600) {
|
||||
return false;
|
||||
}
|
||||
return pos.getY() > 5 && world.getBlockState(pos.down()).isIn(EndTags.GEN_TERRAIN);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -63,9 +63,11 @@ public class IslandLayer {
|
|||
positions.clear();
|
||||
for (int pox = -1; pox < 2; pox++) {
|
||||
int px = pox + ix;
|
||||
long px2 = px;
|
||||
for (int poz = -1; poz < 2; poz++) {
|
||||
int pz = poz + iz;
|
||||
if (GeneratorOptions.noRingVoid() || (long) px + (long) pz > options.centerDist) {
|
||||
long pz2 = pz;
|
||||
if (GeneratorOptions.noRingVoid() || px2 * px2 + pz2 * pz2 > options.centerDist) {
|
||||
RANDOM.setSeed(getSeed(px, pz));
|
||||
double posX = (px + RANDOM.nextFloat()) * options.distance;
|
||||
double posY = MHelper.randRange(options.minY, options.maxY, RANDOM);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue