Eternal portal structure fix
This commit is contained in:
parent
f2b4f4dc99
commit
a2ca5fe3df
2 changed files with 6 additions and 7 deletions
|
@ -125,7 +125,7 @@ public class EndTags {
|
||||||
TagHelper.addTag(BlockTags.BEACON_BASE_BLOCKS, EndBlocks.AETERNIUM_BLOCK);
|
TagHelper.addTag(BlockTags.BEACON_BASE_BLOCKS, EndBlocks.AETERNIUM_BLOCK);
|
||||||
TagHelper.addTag(ItemTags.BEACON_PAYMENT_ITEMS, EndItems.AETERNIUM_INGOT);
|
TagHelper.addTag(ItemTags.BEACON_PAYMENT_ITEMS, EndItems.AETERNIUM_INGOT);
|
||||||
|
|
||||||
TagHelper.addTag(EndTags.DRAGON_IMMUNE, EndBlocks.ENDER_ORE);
|
TagHelper.addTag(EndTags.DRAGON_IMMUNE, EndBlocks.ENDER_ORE, EndBlocks.ETERNAL_PEDESTAL, EndBlocks.FLAVOLITE_RUNED_ETERNAL, EndBlocks.FLAVOLITE_RUNED);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void addSurfaceBlock(Block block) {
|
public static void addSurfaceBlock(Block block) {
|
||||||
|
|
|
@ -27,13 +27,12 @@ public class StructureEternalPortal extends StructureFeatureBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean shouldStartAt(ChunkGenerator chunkGenerator, BiomeSource biomeSource, long worldSeed, ChunkRandom chunkRandom, int chunkX, int chunkZ, Biome biome, ChunkPos chunkPos, DefaultFeatureConfig featureConfig) {
|
protected boolean shouldStartAt(ChunkGenerator chunkGenerator, BiomeSource biomeSource, long worldSeed, ChunkRandom chunkRandom, int chunkX, int chunkZ, Biome biome, ChunkPos chunkPos, DefaultFeatureConfig featureConfig) {
|
||||||
long x = chunkPos.x * chunkPos.x;
|
long x = chunkPos.x;
|
||||||
long z = chunkPos.z * chunkPos.z;
|
long z = chunkPos.z;
|
||||||
long d = x * x + z * z;
|
if (x * x + z * z < 10000) {
|
||||||
if (d < 1024) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (chunkGenerator.getHeight((chunkX << 4) | 8, (chunkZ << 4) | 8, Heightmap.Type.WORLD_SURFACE_WG) < 58) {
|
if (chunkGenerator.getHeight((chunkX << 4) | 8, (chunkZ << 4) | 8, Heightmap.Type.WORLD_SURFACE_WG) < 10) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return super.shouldStartAt(chunkGenerator, biomeSource, worldSeed, chunkRandom, chunkX, chunkZ, biome, chunkPos, featureConfig);
|
return super.shouldStartAt(chunkGenerator, biomeSource, worldSeed, chunkRandom, chunkX, chunkZ, biome, chunkPos, featureConfig);
|
||||||
|
@ -54,7 +53,7 @@ public class StructureEternalPortal extends StructureFeatureBase {
|
||||||
int x = (chunkX << 4) | MHelper.randRange(4, 12, random);
|
int x = (chunkX << 4) | MHelper.randRange(4, 12, random);
|
||||||
int z = (chunkZ << 4) | MHelper.randRange(4, 12, random);
|
int z = (chunkZ << 4) | MHelper.randRange(4, 12, random);
|
||||||
int y = chunkGenerator.getHeight(x, z, Type.WORLD_SURFACE_WG);
|
int y = chunkGenerator.getHeight(x, z, Type.WORLD_SURFACE_WG);
|
||||||
if (y > 10) {
|
if (y > 4) {
|
||||||
this.children.add(new NBTPiece(STRUCTURE_ID, STRUCTURE, new BlockPos(x, y - 4, z), random.nextInt(5), true, random));
|
this.children.add(new NBTPiece(STRUCTURE_ID, STRUCTURE, new BlockPos(x, y - 4, z), random.nextInt(5), true, random));
|
||||||
}
|
}
|
||||||
this.setBoundingBoxFromChildren();
|
this.setBoundingBoxFromChildren();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue