Skip to content

Commit

Permalink
Fixed amethyst geodes generating in the Nether and End
Browse files Browse the repository at this point in the history
  • Loading branch information
Roadhog360 committed Jun 29, 2022
1 parent a22e114 commit e279797
Showing 1 changed file with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,22 @@ protected EtFuturumWorldGenerator() {
@Override
public void generate(Random rand, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
if(world.getWorldInfo().getTerrainType() != WorldType.FLAT || world.getWorldInfo().getGeneratorOptions().contains("decoration") || world.provider.dimensionId != 0) {

int x;
int z;
if (ConfigBlocksItems.enableStones && ConfigWorld.maxStonesPerCluster > 0 && world.provider.dimensionId != -1 && world.provider.dimensionId != 1) {
for(WorldGenMinable stoneGenerator : stoneGen) {
for(int i = 0; i < 10; i++) {
generateOre(stoneGenerator, world, rand, chunkX, chunkZ, 1, 0, 80);
}
}

if(ConfigBlocksItems.enableAmethyst) {
x = chunkX * 16 + rand.nextInt(16) + 8;
z = chunkZ * 16 + rand.nextInt(16) + 8;
if(ConfigWorld.enableAmethystGeodes && rand.nextInt(53) == 0) {
new WorldGenAmethystGeode().generate(world, rand, x, rand.nextInt(52) + 9, z);
}
}
}

if(ConfigBlocksItems.enableCopper) {
Expand All @@ -82,8 +91,6 @@ public void generate(Random rand, int chunkX, int chunkZ, World world, IChunkPro
}

{
int x;
int z;
BiomeGenBase biome;
Type[] biomeList;
//TODO Bone meal
Expand Down Expand Up @@ -126,14 +133,6 @@ public void generate(Random rand, int chunkX, int chunkZ, World world, IChunkPro
new WorldGenFossil().generate(world, rand, x, rand.nextInt(9) + 41, z);
}
}

if(ConfigBlocksItems.enableAmethyst) {
x = chunkX * 16 + rand.nextInt(16) + 8;
z = chunkZ * 16 + rand.nextInt(16) + 8;
if(ConfigWorld.enableAmethystGeodes && rand.nextInt(53) == 0) {
new WorldGenAmethystGeode().generate(world, rand, x, rand.nextInt(52) + 9, z);
}
}
}
}

Expand Down

0 comments on commit e279797

Please sign in to comment.