Readded the Phantasmagoric Inferno

This commit is contained in:
Adubbz 2014-04-18 11:54:43 +10:00
parent 43414b7ca3
commit 5d1cb62cfd
10 changed files with 210 additions and 28 deletions

View file

@ -16,6 +16,5 @@ public class BiomeGenBloodyHeap extends BOPNetherBiome
//customBiomeDecorator.gravesPerChunk = 1; //customBiomeDecorator.gravesPerChunk = 1;
this.bopWorldFeatures.setFeature("waspHivesPerChunk", 1); this.bopWorldFeatures.setFeature("waspHivesPerChunk", 1);
//customBiomeDecorator.generateUndergroundLakes = false;
} }
} }

View file

@ -1,8 +1,9 @@
package biomesoplenty.common.biomes.nether; package biomesoplenty.common.biomes.nether;
import net.minecraft.world.gen.feature.WorldGenFire;
import biomesoplenty.api.BOPBlockHelper; import biomesoplenty.api.BOPBlockHelper;
import biomesoplenty.common.biomes.BOPNetherBiome; import biomesoplenty.common.biomes.BOPNetherBiome;
import net.minecraft.world.gen.feature.WorldGenFire; import biomesoplenty.common.world.features.WorldGenBOPFlora;
public class BiomeGenPhantasmagoricInferno extends BOPNetherBiome public class BiomeGenPhantasmagoricInferno extends BOPNetherBiome
{ {
@ -15,8 +16,14 @@ public class BiomeGenPhantasmagoricInferno extends BOPNetherBiome
this.topBlock = BOPBlockHelper.get("ash"); this.topBlock = BOPBlockHelper.get("ash");
this.fillerBlock = BOPBlockHelper.get("ash"); this.fillerBlock = BOPBlockHelper.get("ash");
this.bopWorldFeatures.setFeature("netherLavaLakesPerChunk", 20);
this.bopWorldFeatures.setFeature("smolderingGrassPerChunk", 8);
//customBiomeDecorator.gravesPerChunk = 1;
this.bopWorldFeatures.setFeature("waspHivesPerChunk", 1);
this.bopWorldFeatures.setFeature("generateAsh", true);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 8); this.bopWorldFeatures.setFeature("bopGrassPerChunk", 8);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenFire(), 1D); this.bopWorldFeatures.weightedGrassGen.put(new WorldGenFire(), 1D);
} }
} }

View file

@ -69,7 +69,7 @@ public class BOPConfigurationIDs
public static int netherGardenID; public static int netherGardenID;
public static int netherDesertID; public static int netherDesertID;
public static int netherLavaID; public static int netherPhantasmagoricInfernoID;
public static int netherBoneID; public static int netherBoneID;
public static int netherBloodyHeapID; public static int netherBloodyHeapID;
@ -182,7 +182,7 @@ public class BOPConfigurationIDs
netherGardenID = config.get("Biome IDs", "Undergarden (Nether) ID", 185).getInt(); netherGardenID = config.get("Biome IDs", "Undergarden (Nether) ID", 185).getInt();
netherDesertID = config.get("Biome IDs", "Corrupted Sands (Nether) ID", 186).getInt(); netherDesertID = config.get("Biome IDs", "Corrupted Sands (Nether) ID", 186).getInt();
netherLavaID = config.get("Biome IDs", "Phantasmagoric Inferno (Nether) ID", 187).getInt(); netherPhantasmagoricInfernoID = config.get("Biome IDs", "Phantasmagoric Inferno (Nether) ID", 187).getInt();
netherBoneID = config.get("Biome IDs", "Boneyard (Nether) ID", 188).getInt(); netherBoneID = config.get("Biome IDs", "Boneyard (Nether) ID", 188).getInt();
netherBloodyHeapID = config.get("Biome IDs", "Bloody Heap (Nether) ID", 189).getInt(); netherBloodyHeapID = config.get("Biome IDs", "Bloody Heap (Nether) ID", 189).getInt();

View file

@ -8,6 +8,7 @@ import net.minecraftforge.common.BiomeManager;
import biomesoplenty.api.BOPBiomeHelper; import biomesoplenty.api.BOPBiomeHelper;
import biomesoplenty.api.BOPBiomeHelper.TemperatureType; import biomesoplenty.api.BOPBiomeHelper.TemperatureType;
import biomesoplenty.common.biomes.nether.BiomeGenBloodyHeap; import biomesoplenty.common.biomes.nether.BiomeGenBloodyHeap;
import biomesoplenty.common.biomes.nether.BiomeGenPhantasmagoricInferno;
import biomesoplenty.common.biomes.overworld.BiomeGenAlps; import biomesoplenty.common.biomes.overworld.BiomeGenAlps;
import biomesoplenty.common.biomes.overworld.BiomeGenArctic; import biomesoplenty.common.biomes.overworld.BiomeGenArctic;
import biomesoplenty.common.biomes.overworld.BiomeGenBambooForest; import biomesoplenty.common.biomes.overworld.BiomeGenBambooForest;
@ -151,6 +152,7 @@ public class BOPBiomes
registerBiome(new BiomeEntry(new BiomeGenWoodland(BOPConfigurationIDs.woodlandID).setBiomeName("Woodland"), TemperatureType.WARM, 10)); registerBiome(new BiomeEntry(new BiomeGenWoodland(BOPConfigurationIDs.woodlandID).setBiomeName("Woodland"), TemperatureType.WARM, 10));
registerBiome(new BiomeEntry(new BiomeGenBloodyHeap(BOPConfigurationIDs.netherBloodyHeapID).setBiomeName("Bloody Heap"), 10), -1); registerBiome(new BiomeEntry(new BiomeGenBloodyHeap(BOPConfigurationIDs.netherBloodyHeapID).setBiomeName("Bloody Heap"), 10), -1);
registerBiome(new BiomeEntry(new BiomeGenPhantasmagoricInferno(BOPConfigurationIDs.netherPhantasmagoricInfernoID).setBiomeName("Phantasmagoric Inferno"), 10), -1);
} }
private static void addSpawnBiomes() private static void addSpawnBiomes()

View file

@ -12,7 +12,6 @@ import java.util.Random;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockFalling; import net.minecraft.block.BlockFalling;
import net.minecraft.block.BlockSand;
import net.minecraft.entity.EnumCreatureType; import net.minecraft.entity.EnumCreatureType;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.util.IProgressUpdate; import net.minecraft.util.IProgressUpdate;
@ -32,7 +31,6 @@ import net.minecraft.world.gen.feature.WorldGenHellLava;
import net.minecraft.world.gen.feature.WorldGenMinable; import net.minecraft.world.gen.feature.WorldGenMinable;
import net.minecraft.world.gen.structure.MapGenNetherBridge; import net.minecraft.world.gen.structure.MapGenNetherBridge;
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.terraingen.ChunkProviderEvent;
import net.minecraftforge.event.terraingen.DecorateBiomeEvent; import net.minecraftforge.event.terraingen.DecorateBiomeEvent;
import net.minecraftforge.event.terraingen.PopulateChunkEvent; import net.minecraftforge.event.terraingen.PopulateChunkEvent;
import net.minecraftforge.event.terraingen.TerrainGen; import net.minecraftforge.event.terraingen.TerrainGen;

View file

@ -79,6 +79,8 @@ public class BOPWorldFeatures
addFeature("wasteland3PerChunk", 0); addFeature("wasteland3PerChunk", 0);
addFeature("wasteland4PerChunk", 0); addFeature("wasteland4PerChunk", 0);
addFeature("wastelandRockPilesPerChunk", 0); addFeature("wastelandRockPilesPerChunk", 0);
addFeature("smolderingGrassPerChunk", 0);
addFeature("netherLavaLakesPerChunk", 0);
//Nether Features //Nether Features
addFeature("waspHivesPerChunk", 0); addFeature("waspHivesPerChunk", 0);

View file

@ -1,23 +1,25 @@
package biomesoplenty.common.world.features; package biomesoplenty.common.world.features;
import biomesoplenty.common.world.decoration.BOPDecorationManager; import java.util.Random;
import biomesoplenty.common.world.generation.WorldGeneratorBOP;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.biome.BiomeGenBase;
import biomesoplenty.api.BOPBlockHelper;
import java.util.Random; import biomesoplenty.common.world.decoration.BOPDecorationManager;
import biomesoplenty.common.world.generation.WorldGeneratorBOP;
public class WorldGenBOPTallGrass extends WorldGeneratorBOP public class WorldGenBOPTallGrass extends WorldGeneratorBOP
{ {
private Block tallGrass; private Block tallGrass;
private int tallGrassMetadata; private int tallGrassMetadata;
public WorldGenBOPTallGrass(Block p_i45466_1_, int p_i45466_2_) public WorldGenBOPTallGrass(Block tallGrass, int tallGrassMetadata)
{ {
this.tallGrass = p_i45466_1_; this.tallGrass = tallGrass;
this.tallGrassMetadata = p_i45466_2_; this.tallGrassMetadata = tallGrassMetadata;
} }
@Override @Override
@ -41,9 +43,19 @@ public class WorldGenBOPTallGrass extends WorldGeneratorBOP
int j1 = y + random.nextInt(4) - random.nextInt(4); int j1 = y + random.nextInt(4) - random.nextInt(4);
int k1 = z + random.nextInt(8) - random.nextInt(8); int k1 = z + random.nextInt(8) - random.nextInt(8);
if (world.isAirBlock(i1, j1, k1) && this.tallGrass.canReplace(world, i1, j1, k1, 0, new ItemStack(this.tallGrass, 1, this.tallGrassMetadata))) if (this.tallGrass == BOPBlockHelper.get("grass"))
{ {
world.setBlock(i1, j1, k1, this.tallGrass, this.tallGrassMetadata, 2); if (world.isAirBlock(i1, j1, k1) && world.getBlock(i1, j1 - 1, k1) == BOPBlockHelper.get("ash") || world.getBlock(i1, j1 - 1, k1) == Blocks.netherrack)
{
world.setBlock(i1, j1 - 1, k1, this.tallGrass, this.tallGrassMetadata, 2);
}
}
else
{
if (world.isAirBlock(i1, j1, k1) && (this.tallGrass.canReplace(world, i1, j1, k1, 0, new ItemStack(this.tallGrass, 1, this.tallGrassMetadata))))
{
world.setBlock(i1, j1, k1, this.tallGrass, this.tallGrassMetadata, 2);
}
} }
} }
@ -57,7 +69,7 @@ public class WorldGenBOPTallGrass extends WorldGeneratorBOP
{ {
int randX = x + random.nextInt(16) + 8; int randX = x + random.nextInt(16) + 8;
int randZ = z + random.nextInt(16) + 8; int randZ = z + random.nextInt(16) + 8;
int randY = random.nextInt(world.getHeightValue(randX, randZ) * 2); int randY = this.tallGrass == BOPBlockHelper.get("grass") ? random.nextInt(256) : random.nextInt(world.getHeightValue(randX, randZ) * 2);
this.generate(world, random, randX, randY, randZ); this.generate(world, random, randX, randY, randZ);
} }

View file

@ -38,7 +38,7 @@ public class WorldGenBOPGrassManager extends WorldGeneratorBOP
{ {
int randX = x + random.nextInt(16) + 8; int randX = x + random.nextInt(16) + 8;
int randZ = z + random.nextInt(16) + 8; int randZ = z + random.nextInt(16) + 8;
int randY = random.nextInt(world.getHeightValue(randX, randZ) * 2); int randY = random.nextInt(256);
this.generate(world, random, randX, randY, randZ); this.generate(world, random, randX, randY, randZ);
} }

View file

@ -0,0 +1,141 @@
package biomesoplenty.common.world.features.nether;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.init.Blocks;
import net.minecraft.world.EnumSkyBlock;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import biomesoplenty.common.world.decoration.BOPDecorationManager;
import biomesoplenty.common.world.generation.WorldGeneratorBOP;
public class WorldGenLakesNether extends WorldGeneratorBOP
{
public boolean generate(World world, Random rand, int x, int y, int z)
{
x -= 8;
for (z -= 8; y > 5 && world.isAirBlock(x, y, z); --y)
{
;
}
if (y <= 4)
{
return false;
}
else
{
y -= 4;
boolean[] aboolean = new boolean[2048];
int l = rand.nextInt(4) + 4;
int i1;
for (i1 = 0; i1 < l; ++i1)
{
double d0 = rand.nextDouble() * 6.0D + 3.0D;
double d1 = rand.nextDouble() * 4.0D + 2.0D;
double d2 = rand.nextDouble() * 6.0D + 3.0D;
double d3 = rand.nextDouble() * (16.0D - d0 - 2.0D) + 1.0D + d0 / 2.0D;
double d4 = rand.nextDouble() * (8.0D - d1 - 4.0D) + 2.0D + d1 / 2.0D;
double d5 = rand.nextDouble() * (16.0D - d2 - 2.0D) + 1.0D + d2 / 2.0D;
for (int k1 = 1; k1 < 15; ++k1)
{
for (int l1 = 1; l1 < 15; ++l1)
{
for (int i2 = 1; i2 < 7; ++i2)
{
double d6 = ((double)k1 - d3) / (d0 / 2.0D);
double d7 = ((double)i2 - d4) / (d1 / 2.0D);
double d8 = ((double)l1 - d5) / (d2 / 2.0D);
double d9 = d6 * d6 + d7 * d7 + d8 * d8;
if (d9 < 1.0D)
{
aboolean[(k1 * 16 + l1) * 8 + i2] = true;
}
}
}
}
}
int j1;
int j2;
boolean flag;
for (i1 = 0; i1 < 16; ++i1)
{
for (j2 = 0; j2 < 16; ++j2)
{
for (j1 = 0; j1 < 8; ++j1)
{
flag = !aboolean[(i1 * 16 + j2) * 8 + j1] && (i1 < 15 && aboolean[((i1 + 1) * 16 + j2) * 8 + j1] || i1 > 0 && aboolean[((i1 - 1) * 16 + j2) * 8 + j1] || j2 < 15 && aboolean[(i1 * 16 + j2 + 1) * 8 + j1] || j2 > 0 && aboolean[(i1 * 16 + (j2 - 1)) * 8 + j1] || j1 < 7 && aboolean[(i1 * 16 + j2) * 8 + j1 + 1] || j1 > 0 && aboolean[(i1 * 16 + j2) * 8 + (j1 - 1)]);
if (flag)
{
Material material = world.getBlock(x + i1, y + j1, z + j2).getMaterial();
if (j1 >= 4 && material.isLiquid())
{
return false;
}
if (j1 < 4 && !material.isSolid() && world.getBlock(x + i1, y + j1, z + j2) != Blocks.lava)
{
return false;
}
}
}
}
}
for (i1 = 0; i1 < 16; ++i1)
{
for (j2 = 0; j2 < 16; ++j2)
{
for (j1 = 0; j1 < 8; ++j1)
{
if (aboolean[(i1 * 16 + j2) * 8 + j1])
{
world.setBlock(x + i1, y + j1, z + j2, j1 >= 4 ? Blocks.air : Blocks.lava, 0, 2);
}
}
}
}
for (i1 = 0; i1 < 16; ++i1)
{
for (j2 = 0; j2 < 16; ++j2)
{
for (j1 = 0; j1 < 8; ++j1)
{
flag = !aboolean[(i1 * 16 + j2) * 8 + j1] && (i1 < 15 && aboolean[((i1 + 1) * 16 + j2) * 8 + j1] || i1 > 0 && aboolean[((i1 - 1) * 16 + j2) * 8 + j1] || j2 < 15 && aboolean[(i1 * 16 + j2 + 1) * 8 + j1] || j2 > 0 && aboolean[(i1 * 16 + (j2 - 1)) * 8 + j1] || j1 < 7 && aboolean[(i1 * 16 + j2) * 8 + j1 + 1] || j1 > 0 && aboolean[(i1 * 16 + j2) * 8 + (j1 - 1)]);
if (flag && (j1 < 4 || rand.nextInt(2) != 0) && world.getBlock(x + i1, y + j1, z + j2).getMaterial().isSolid())
{
world.setBlock(x + i1, y + j1, z + j2, Blocks.netherrack, 0, 2);
}
}
}
}
return true;
}
}
@Override
public void setupGeneration(World world, Random random, BiomeGenBase biome, String featureName, int x, int z)
{
for (int i = 0; i < (Integer)BOPDecorationManager.getBiomeFeatures(biome.biomeID).getFeature(featureName); i++)
{
int randX = x + random.nextInt(16) + 8;
int randY = random.nextInt(random.nextInt(random.nextInt(112) + 8) + 8);
int randZ = z + random.nextInt(16) + 8;
this.generate(world, random, randX, randY, randZ);
}
}
}

View file

@ -1,20 +1,38 @@
package biomesoplenty.common.world.generation; package biomesoplenty.common.world.generation;
import biomesoplenty.api.BOPBlockHelper; import java.util.HashMap;
import biomesoplenty.common.world.features.*;
import biomesoplenty.common.world.features.managers.WorldGenBOPFlowerManager;
import biomesoplenty.common.world.features.managers.WorldGenBOPGrassManager;
import biomesoplenty.common.world.features.nether.WorldGenWaspHive;
import biomesoplenty.common.world.forcedgenerators.LakesForcedGenerator;
import biomesoplenty.common.world.forcedgenerators.MelonForcedGenerator;
import biomesoplenty.common.world.forcedgenerators.PondForcedGenerator;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.world.gen.feature.WorldGenLakes; import net.minecraft.world.gen.feature.WorldGenLakes;
import net.minecraft.world.gen.feature.WorldGenLiquids; import net.minecraft.world.gen.feature.WorldGenLiquids;
import net.minecraft.world.gen.feature.WorldGenMelon; import net.minecraft.world.gen.feature.WorldGenMelon;
import net.minecraft.world.gen.feature.WorldGenerator; import net.minecraft.world.gen.feature.WorldGenerator;
import biomesoplenty.api.BOPBlockHelper;
import java.util.HashMap; import biomesoplenty.common.world.features.WorldGenBOPBlob;
import biomesoplenty.common.world.features.WorldGenBOPCoral;
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
import biomesoplenty.common.world.features.WorldGenBOPFlora;
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
import biomesoplenty.common.world.features.WorldGenBOPUndergroundDecoration;
import biomesoplenty.common.world.features.WorldGenCobwebNest;
import biomesoplenty.common.world.features.WorldGenGrassSplatter;
import biomesoplenty.common.world.features.WorldGenLavaSpout;
import biomesoplenty.common.world.features.WorldGenLog;
import biomesoplenty.common.world.features.WorldGenRiverCane;
import biomesoplenty.common.world.features.WorldGenSplotches;
import biomesoplenty.common.world.features.WorldGenWasteland;
import biomesoplenty.common.world.features.WorldGenWasteland2;
import biomesoplenty.common.world.features.WorldGenWasteland3;
import biomesoplenty.common.world.features.WorldGenWasteland4;
import biomesoplenty.common.world.features.WorldGenWaterReeds;
import biomesoplenty.common.world.features.WorldGenWaterside;
import biomesoplenty.common.world.features.managers.WorldGenBOPFlowerManager;
import biomesoplenty.common.world.features.managers.WorldGenBOPGrassManager;
import biomesoplenty.common.world.features.nether.WorldGenLakesNether;
import biomesoplenty.common.world.features.nether.WorldGenWaspHive;
import biomesoplenty.common.world.forcedgenerators.LakesForcedGenerator;
import biomesoplenty.common.world.forcedgenerators.MelonForcedGenerator;
import biomesoplenty.common.world.forcedgenerators.PondForcedGenerator;
public class WorldGenFieldAssociation public class WorldGenFieldAssociation
{ {
@ -78,6 +96,8 @@ public class WorldGenFieldAssociation
associateFeature("wasteland2PerChunk", new WorldGenWasteland2()); associateFeature("wasteland2PerChunk", new WorldGenWasteland2());
associateFeature("wasteland3PerChunk", new WorldGenWasteland3()); associateFeature("wasteland3PerChunk", new WorldGenWasteland3());
associateFeature("wasteland4PerChunk", new WorldGenWasteland4()); associateFeature("wasteland4PerChunk", new WorldGenWasteland4());
associateFeature("smolderingGrassPerChunk", new WorldGenBOPTallGrass(BOPBlockHelper.get("grass"), 1));
associateFeature("netherLavaLakesPerChunk", new WorldGenLakesNether());
//Nether Features //Nether Features
associateFeature("waspHivesPerChunk", new WorldGenWaspHive()); associateFeature("waspHivesPerChunk", new WorldGenWaspHive());
@ -85,6 +105,7 @@ public class WorldGenFieldAssociation
associateFeature("bopFlowersPerChunk", new WorldGenBOPFlowerManager()); associateFeature("bopFlowersPerChunk", new WorldGenBOPFlowerManager());
associateFeature("bopGrassPerChunk", new WorldGenBOPGrassManager()); associateFeature("bopGrassPerChunk", new WorldGenBOPGrassManager());
} }
private static void associateFeaturesForced() private static void associateFeaturesForced()
{ {
associateFeatureForced("waterPoolsPerChunk", new WorldGenLiquids(Blocks.flowing_water), PondForcedGenerator.class); associateFeatureForced("waterPoolsPerChunk", new WorldGenLiquids(Blocks.flowing_water), PondForcedGenerator.class);