Removed the Promised Land, did a significant cleanup of the system for world gen features
This commit is contained in:
parent
e017c2e752
commit
1bd84e3652
|
@ -1,35 +1,18 @@
|
||||||
package biomesoplenty;
|
package biomesoplenty;
|
||||||
|
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
|
||||||
import net.minecraftforge.common.DimensionManager;
|
|
||||||
import biomesoplenty.common.configuration.BOPConfiguration;
|
import biomesoplenty.common.configuration.BOPConfiguration;
|
||||||
import biomesoplenty.common.configuration.BOPConfigurationBiomeGen;
|
import biomesoplenty.common.configuration.BOPConfigurationBiomeGen;
|
||||||
import biomesoplenty.common.configuration.BOPConfigurationIDs;
|
|
||||||
import biomesoplenty.common.configuration.BOPConfigurationWorldFeatures;
|
import biomesoplenty.common.configuration.BOPConfigurationWorldFeatures;
|
||||||
import biomesoplenty.common.configuration.structures.BOPConfigurationStrongholds;
|
import biomesoplenty.common.configuration.structures.BOPConfigurationStrongholds;
|
||||||
import biomesoplenty.common.configuration.structures.BOPConfigurationVillages;
|
import biomesoplenty.common.configuration.structures.BOPConfigurationVillages;
|
||||||
import biomesoplenty.common.core.BOPArmor;
|
import biomesoplenty.common.core.*;
|
||||||
import biomesoplenty.common.core.BOPBiomes;
|
|
||||||
import biomesoplenty.common.core.BOPBlocks;
|
|
||||||
import biomesoplenty.common.core.BOPCrafting;
|
|
||||||
import biomesoplenty.common.core.BOPDimensions;
|
|
||||||
import biomesoplenty.common.core.BOPEntities;
|
|
||||||
import biomesoplenty.common.core.BOPFluids;
|
|
||||||
import biomesoplenty.common.core.BOPItems;
|
|
||||||
import biomesoplenty.common.core.BOPPackets;
|
|
||||||
import biomesoplenty.common.core.BOPPotions;
|
|
||||||
import biomesoplenty.common.core.BOPVanillaCompat;
|
|
||||||
import biomesoplenty.common.eventhandler.BOPEventHandlers;
|
import biomesoplenty.common.eventhandler.BOPEventHandlers;
|
||||||
import biomesoplenty.common.helpers.CreativeTabsBOP;
|
import biomesoplenty.common.helpers.CreativeTabsBOP;
|
||||||
import biomesoplenty.common.integration.TreecapitatorIntegration;
|
import biomesoplenty.common.integration.TreecapitatorIntegration;
|
||||||
import biomesoplenty.common.network.PacketPipeline;
|
import biomesoplenty.common.network.PacketPipeline;
|
||||||
import biomesoplenty.common.utils.BOPModInfo;
|
import biomesoplenty.common.utils.BOPModInfo;
|
||||||
import biomesoplenty.common.world.WorldProviderBOPHell;
|
|
||||||
import biomesoplenty.common.world.WorldProviderPromised;
|
|
||||||
import biomesoplenty.common.world.WorldTypeBOP;
|
import biomesoplenty.common.world.WorldTypeBOP;
|
||||||
import biomesoplenty.common.world.decoration.ForcedDecorators;
|
import biomesoplenty.common.world.decoration.ForcedDecorators;
|
||||||
import biomesoplenty.common.world.generation.ForcedBOPWorldGenerators;
|
|
||||||
import biomesoplenty.common.world.generation.WorldGenFieldAssociation;
|
|
||||||
import cpw.mods.fml.common.Mod;
|
import cpw.mods.fml.common.Mod;
|
||||||
import cpw.mods.fml.common.Mod.EventHandler;
|
import cpw.mods.fml.common.Mod.EventHandler;
|
||||||
import cpw.mods.fml.common.Mod.Instance;
|
import cpw.mods.fml.common.Mod.Instance;
|
||||||
|
@ -37,6 +20,7 @@ import cpw.mods.fml.common.SidedProxy;
|
||||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||||
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
|
|
||||||
@Mod(modid = BOPModInfo.modID, name = BOPModInfo.modName, dependencies = "after:Natura; required-after:Forge@[1.42.666.42.1,)")
|
@Mod(modid = BOPModInfo.modID, name = BOPModInfo.modName, dependencies = "after:Natura; required-after:Forge@[1.42.666.42.1,)")
|
||||||
public class BiomesOPlenty
|
public class BiomesOPlenty
|
||||||
|
@ -69,13 +53,11 @@ public class BiomesOPlenty
|
||||||
BOPFluids.init();
|
BOPFluids.init();
|
||||||
BOPArmor.init();
|
BOPArmor.init();
|
||||||
BOPCrafting.init();
|
BOPCrafting.init();
|
||||||
BOPBiomes.init();
|
BOPWorld.init();
|
||||||
BOPConfigurationBiomeGen.init(BOPConfiguration.biomeGenConfigFile);
|
BOPConfigurationBiomeGen.init(BOPConfiguration.biomeGenConfigFile);
|
||||||
BOPConfigurationVillages.init(BOPConfiguration.villagesConfigFile);
|
BOPConfigurationVillages.init(BOPConfiguration.villagesConfigFile);
|
||||||
BOPConfigurationStrongholds.init(BOPConfiguration.strongholdsConfigFile);
|
BOPConfigurationStrongholds.init(BOPConfiguration.strongholdsConfigFile);
|
||||||
WorldGenFieldAssociation.init();
|
|
||||||
BOPConfigurationWorldFeatures.init(BOPConfiguration.worldFeaturesConfigFile);
|
BOPConfigurationWorldFeatures.init(BOPConfiguration.worldFeaturesConfigFile);
|
||||||
ForcedBOPWorldGenerators.init();
|
|
||||||
ForcedDecorators.init();
|
ForcedDecorators.init();
|
||||||
BOPEntities.init();
|
BOPEntities.init();
|
||||||
BOPVanillaCompat.init();
|
BOPVanillaCompat.init();
|
||||||
|
@ -100,6 +82,6 @@ public class BiomesOPlenty
|
||||||
{
|
{
|
||||||
packetPipeline.postInitialize();
|
packetPipeline.postInitialize();
|
||||||
|
|
||||||
BOPBiomes.worldTypeBOP = new WorldTypeBOP();
|
BOPWorld.worldTypeBOP = new WorldTypeBOP();
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,17 +1,13 @@
|
||||||
package biomesoplenty.api;
|
package biomesoplenty.api;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import biomesoplenty.common.world.layer.GenLayerBiomeBOP;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map.Entry;
|
|
||||||
|
|
||||||
import net.minecraft.util.WeightedRandom;
|
import net.minecraft.util.WeightedRandom;
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
import net.minecraft.world.biome.BiomeGenBase;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.lang3.text.WordUtils;
|
import org.apache.commons.lang3.text.WordUtils;
|
||||||
|
|
||||||
import biomesoplenty.common.configuration.BOPConfigurationIDs;
|
import java.util.HashMap;
|
||||||
import biomesoplenty.common.world.layer.GenLayerBiomeBOP;
|
import java.util.List;
|
||||||
|
|
||||||
public class BOPBiomeHelper
|
public class BOPBiomeHelper
|
||||||
{
|
{
|
||||||
|
@ -21,7 +17,6 @@ public class BOPBiomeHelper
|
||||||
{
|
{
|
||||||
biomeLists[-1 + 1] = new HashMap();
|
biomeLists[-1 + 1] = new HashMap();
|
||||||
biomeLists[0 + 1] = new HashMap();
|
biomeLists[0 + 1] = new HashMap();
|
||||||
biomeLists[BOPConfigurationIDs.promisedLandDimID + 1] = new HashMap();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void registerBiome(BOPBiomeEntry biome, int dimID, String name)
|
public static void registerBiome(BOPBiomeEntry biome, int dimID, String name)
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
|
import biomesoplenty.common.world.decoration.BOPDecorationManager;
|
||||||
|
import biomesoplenty.common.world.decoration.BOPWorldFeatures;
|
||||||
|
import biomesoplenty.common.world.decoration.IBOPBiome;
|
||||||
|
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
||||||
|
import net.minecraft.world.biome.BiomeGenBase;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import net.minecraft.world.World;
|
public abstract class BOPBiome extends BiomeGenBase implements IBOPBiome
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.common.world.decoration.BOPWorldFeatures;
|
|
||||||
import biomesoplenty.common.world.decoration.IBOPDecoration;
|
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
|
||||||
|
|
||||||
public abstract class BOPBiome extends BiomeGenBase implements IBOPDecoration
|
|
||||||
{
|
{
|
||||||
protected BOPWorldFeatures bopWorldFeatures;
|
protected BOPWorldFeatures bopWorldFeatures;
|
||||||
|
|
||||||
|
@ -19,10 +19,10 @@ public abstract class BOPBiome extends BiomeGenBase implements IBOPDecoration
|
||||||
{
|
{
|
||||||
super(biomeID);
|
super(biomeID);
|
||||||
|
|
||||||
bopWorldFeatures = new BOPWorldFeatures();
|
bopWorldFeatures = BOPDecorationManager.getBiomeFeatures(biomeID);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
/*@Override
|
||||||
public void decorate(World world, Random random, int x, int z)
|
public void decorate(World world, Random random, int x, int z)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -41,14 +41,14 @@ public abstract class BOPBiome extends BiomeGenBase implements IBOPDecoration
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public WorldGenBOPFlora getRandomWorldGenForBOPFlowers(Random random)
|
public WorldGenBOPFlora getRandomWorldGenForBOPFlowers(Random random)
|
||||||
{
|
{
|
||||||
if (getWeightedWorldGenForBOPFlowers() != null && !getWeightedWorldGenForBOPFlowers().isEmpty())
|
if (weightedFlowerGen != null && !weightedFlowerGen.isEmpty())
|
||||||
{
|
{
|
||||||
return getRandomWeightedWorldGenerator(getWeightedWorldGenForBOPFlowers());
|
return getRandomWeightedWorldGenerator(weightedFlowerGen);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -59,9 +59,9 @@ public abstract class BOPBiome extends BiomeGenBase implements IBOPDecoration
|
||||||
@Override
|
@Override
|
||||||
public WorldGenerator getRandomWorldGenForGrass(Random random)
|
public WorldGenerator getRandomWorldGenForGrass(Random random)
|
||||||
{
|
{
|
||||||
if (getWeightedWorldGenForGrass() != null && !getWeightedWorldGenForGrass().isEmpty())
|
if (weightedGrassGen != null && !weightedGrassGen.isEmpty())
|
||||||
{
|
{
|
||||||
return getRandomWeightedWorldGenerator(getWeightedWorldGenForGrass());
|
return getRandomWeightedWorldGenerator(weightedGrassGen);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -69,18 +69,6 @@ public abstract class BOPBiome extends BiomeGenBase implements IBOPDecoration
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenBOPFlora, Integer> getWeightedWorldGenForBOPFlowers()
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static <T extends WorldGenerator> T getRandomWeightedWorldGenerator(HashMap<T, ? extends Number> worldGeneratorMap)
|
public static <T extends WorldGenerator> T getRandomWeightedWorldGenerator(HashMap<T, ? extends Number> worldGeneratorMap)
|
||||||
{
|
{
|
||||||
double completeWeight = 0D;
|
double completeWeight = 0D;
|
||||||
|
@ -104,7 +92,7 @@ public abstract class BOPBiome extends BiomeGenBase implements IBOPDecoration
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BOPWorldFeatures getWorldFeatures()
|
public BOPWorldFeatures getBiomeFeatures()
|
||||||
{
|
{
|
||||||
return bopWorldFeatures;
|
return bopWorldFeatures;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,11 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
|
||||||
import net.minecraft.world.biome.BiomeGenBase.Height;
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenAlps extends BOPBiome
|
public class BiomeGenAlps extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -18,9 +15,7 @@ public class BiomeGenAlps extends BOPBiome
|
||||||
{
|
{
|
||||||
super(id);
|
super(id);
|
||||||
|
|
||||||
//TODO: setHeight()
|
|
||||||
this.setHeight(biomeHeight);
|
this.setHeight(biomeHeight);
|
||||||
//TODO: setColor()
|
|
||||||
this.setColor(13421772);
|
this.setColor(13421772);
|
||||||
this.setTemperatureRainfall(0.0F, 0.5F);
|
this.setTemperatureRainfall(0.0F, 0.5F);
|
||||||
|
|
||||||
|
@ -45,12 +40,10 @@ public class BiomeGenAlps extends BOPBiome
|
||||||
int y = random.nextInt(28) + 4;
|
int y = random.nextInt(28) + 4;
|
||||||
int z = chunkZ + random.nextInt(16);
|
int z = chunkZ + random.nextInt(16);
|
||||||
|
|
||||||
//TODO: getBlock()
|
|
||||||
Block block = world.getBlock(x, y, z);
|
Block block = world.getBlock(x, y, z);
|
||||||
|
|
||||||
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
||||||
{
|
{
|
||||||
//TODO: setBlock()
|
|
||||||
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 8, 2);
|
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 8, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.Random;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
|
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
||||||
|
import biomesoplenty.common.world.features.trees.WorldGenBulbTree;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
@ -9,9 +10,8 @@ import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
import net.minecraft.world.gen.feature.WorldGenShrub;
|
import net.minecraft.world.gen.feature.WorldGenShrub;
|
||||||
import net.minecraft.world.gen.feature.WorldGenTallGrass;
|
import net.minecraft.world.gen.feature.WorldGenTallGrass;
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
import java.util.Random;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBulbTree;
|
|
||||||
|
|
||||||
public class BiomeGenBambooForest extends BOPBiome
|
public class BiomeGenBambooForest extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -21,22 +21,20 @@ public class BiomeGenBambooForest extends BOPBiome
|
||||||
{
|
{
|
||||||
super(id);
|
super(id);
|
||||||
|
|
||||||
//TODO: setHeight()
|
|
||||||
this.setHeight(biomeHeight);
|
this.setHeight(biomeHeight);
|
||||||
//TODO: setColor()
|
|
||||||
this.setColor(10739795);
|
this.setColor(10739795);
|
||||||
this.setTemperatureRainfall(1.2F, 0.9F);
|
this.setTemperatureRainfall(1.2F, 0.9F);
|
||||||
|
|
||||||
this.theBiomeDecorator.treesPerChunk = 30;
|
this.bopWorldFeatures.setFeature("treesPerChunk", 30);
|
||||||
this.theBiomeDecorator.grassPerChunk = 5;
|
this.bopWorldFeatures.setFeature("grassPerChunk", 5);
|
||||||
this.theBiomeDecorator.flowersPerChunk = -999;
|
this.bopWorldFeatures.setFeature("flowersPerChunk", -999);
|
||||||
|
|
||||||
this.bopWorldFeatures.riverCanePerChunk = 6;
|
this.bopWorldFeatures.setFeature("riverCanePerChunk", 6);
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 6;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 6);
|
||||||
this.bopWorldFeatures.bushesPerChunk = 5;
|
this.bopWorldFeatures.setFeature("bushesPerChunk", 5);
|
||||||
this.bopWorldFeatures.leafPilesPerChunk = 15;
|
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 15);
|
||||||
|
|
||||||
this.bopWorldFeatures.generatePumpkins = false;
|
this.bopWorldFeatures.setFeature("generatePumpkins", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -51,23 +49,22 @@ public class BiomeGenBambooForest extends BOPBiome
|
||||||
int y = random.nextInt(28) + 4;
|
int y = random.nextInt(28) + 4;
|
||||||
int z = chunkZ + random.nextInt(16);
|
int z = chunkZ + random.nextInt(16);
|
||||||
|
|
||||||
//TODO: getBlock()
|
|
||||||
Block block = world.getBlock(x, y, z);
|
Block block = world.getBlock(x, y, z);
|
||||||
|
|
||||||
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
||||||
{
|
{
|
||||||
//TODO: setBlock()
|
|
||||||
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 6, 2);
|
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 6, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void genTerrainBlocks(World p_150573_1_, Random p_150573_2_, Block[] p_150573_3_, byte[] p_150573_4_, int p_150573_5_, int p_150573_6_, double p_150573_7_)
|
@Override
|
||||||
|
public void genTerrainBlocks(World world, Random random, Block[] p_150573_3_, byte[] p_150573_4_, int p_150573_5_, int p_150573_6_, double p_150573_7_)
|
||||||
{
|
{
|
||||||
this.topBlock = Blocks.dirt;
|
this.topBlock = Blocks.dirt;
|
||||||
this.field_150604_aj = 2;
|
this.field_150604_aj = 2;
|
||||||
|
|
||||||
this.genBiomeTerrain(p_150573_1_, p_150573_2_, p_150573_3_, p_150573_4_, p_150573_5_, p_150573_6_, p_150573_7_);
|
this.genBiomeTerrain(world, random, p_150573_3_, p_150573_4_, p_150573_5_, p_150573_6_, p_150573_7_);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -84,15 +81,13 @@ public class BiomeGenBambooForest extends BOPBiome
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeGrassColor()
|
public int getBiomeGrassColor(int x, int y, int z)
|
||||||
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
|
||||||
{
|
{
|
||||||
double d0 = plantNoise.func_151601_a((double)p_150558_1_ * 0.0225D, (double)p_150558_3_ * 0.0225D);
|
double d0 = plantNoise.func_151601_a((double)x * 0.0225D, (double)z * 0.0225D);
|
||||||
return d0 < -0.7D ? 13949781 : (d0 < -0.3 ? 12311892 : 10739795);
|
return d0 < -0.7D ? 13949781 : (d0 < -0.3 ? 12311892 : 10739795);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeFoliageColor()
|
|
||||||
public int getBiomeFoliageColor(int x, int y, int z)
|
public int getBiomeFoliageColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
double d0 = plantNoise.func_151601_a((double)x * 0.0225D, (double)z * 0.0225D);
|
double d0 = plantNoise.func_151601_a((double)x * 0.0225D, (double)z * 0.0225D);
|
||||||
|
|
|
@ -1,15 +1,5 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.entity.monster.EntitySlime;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.biome.BiomeGenBase.Height;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
|
@ -17,6 +7,13 @@ import biomesoplenty.common.world.features.WorldGenMoss;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBayou1;
|
import biomesoplenty.common.world.features.trees.WorldGenBayou1;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBayou2;
|
import biomesoplenty.common.world.features.trees.WorldGenBayou2;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBayou3;
|
import biomesoplenty.common.world.features.trees.WorldGenBayou3;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.entity.monster.EntitySlime;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenBayou extends BOPBiome
|
public class BiomeGenBayou extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -26,9 +23,7 @@ public class BiomeGenBayou extends BOPBiome
|
||||||
{
|
{
|
||||||
super(id);
|
super(id);
|
||||||
|
|
||||||
//TODO: setHeight()
|
|
||||||
this.setHeight(biomeHeight);
|
this.setHeight(biomeHeight);
|
||||||
//TODO: setColor()
|
|
||||||
this.setColor(9154411);
|
this.setColor(9154411);
|
||||||
this.setTemperatureRainfall(0.5F, 0.9F);
|
this.setTemperatureRainfall(0.5F, 0.9F);
|
||||||
|
|
||||||
|
@ -45,17 +40,21 @@ public class BiomeGenBayou extends BOPBiome
|
||||||
this.theBiomeDecorator.sandPerChunk = -999;
|
this.theBiomeDecorator.sandPerChunk = -999;
|
||||||
this.theBiomeDecorator.sandPerChunk2 = -999;
|
this.theBiomeDecorator.sandPerChunk2 = -999;
|
||||||
|
|
||||||
this.bopWorldFeatures.waterLakesPerChunk = 5;
|
this.bopWorldFeatures.setFeature("waterLakesPerChunk", 5);
|
||||||
this.bopWorldFeatures.mudPerChunk = 1;
|
this.bopWorldFeatures.setFeature("mudPerChunk", 1);
|
||||||
this.bopWorldFeatures.toadstoolsPerChunk = 2;
|
this.bopWorldFeatures.setFeature("toadstoolsPerChunk", 2);
|
||||||
this.bopWorldFeatures.cattailsPerChunk = 1;
|
this.bopWorldFeatures.setFeature("cattailsPerChunk", 1);
|
||||||
this.bopWorldFeatures.highCattailsPerChunk = 1;
|
this.bopWorldFeatures.setFeature("highCattailsPerChunk", 1);
|
||||||
this.bopWorldFeatures.algaePerChunk = 1;
|
this.bopWorldFeatures.setFeature("algaePerChunk", 1);
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 2;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 2);
|
||||||
this.bopWorldFeatures.waterReedsPerChunk = 4;
|
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 4);
|
||||||
this.bopWorldFeatures.koruPerChunk = 1;
|
this.bopWorldFeatures.setFeature("koruPerChunk", 1);
|
||||||
this.bopWorldFeatures.seaweedPerChunk = 15;
|
this.bopWorldFeatures.setFeature("seaweedPerChunk", 15);
|
||||||
this.bopWorldFeatures.generatePumpkins = false;
|
this.bopWorldFeatures.setFeature("generatePumpkins", false);
|
||||||
|
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -67,18 +66,6 @@ public class BiomeGenBayou extends BOPBiome
|
||||||
new WorldGenBayou2(BOPBlockHelper.get("logs3"), BOPBlockHelper.get("colorizedLeaves2"), 1, 0));
|
new WorldGenBayou2(BOPBlockHelper.get("logs3"), BOPBlockHelper.get("colorizedLeaves2"), 1, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
||||||
{
|
{
|
||||||
|
@ -91,12 +78,10 @@ public class BiomeGenBayou extends BOPBiome
|
||||||
int y = random.nextInt(28) + 4;
|
int y = random.nextInt(28) + 4;
|
||||||
int z = chunkZ + random.nextInt(16);
|
int z = chunkZ + random.nextInt(16);
|
||||||
|
|
||||||
//TODO: getBlock()
|
|
||||||
Block block = world.getBlock(x, y, z);
|
Block block = world.getBlock(x, y, z);
|
||||||
|
|
||||||
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
||||||
{
|
{
|
||||||
//TODO: setBlock()
|
|
||||||
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 10, 2);
|
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 10, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -112,14 +97,12 @@ public class BiomeGenBayou extends BOPBiome
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeGrassColor()
|
|
||||||
public int getBiomeGrassColor(int x, int y, int z)
|
public int getBiomeGrassColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 9154411;
|
return 9154411;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeFoliageColor()
|
|
||||||
public int getBiomeFoliageColor(int x, int y, int z)
|
public int getBiomeFoliageColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 11591816;
|
return 11591816;
|
||||||
|
|
|
@ -1,19 +1,16 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.biome.BiomeGenBase.Height;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
import biomesoplenty.common.world.features.WorldGenMarsh;
|
import biomesoplenty.common.world.features.WorldGenMarsh;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBogBush;
|
import biomesoplenty.common.world.features.trees.WorldGenBogBush;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenCypress;
|
import biomesoplenty.common.world.features.trees.WorldGenCypress;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenBog extends BOPBiome
|
public class BiomeGenBog extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -23,9 +20,7 @@ public class BiomeGenBog extends BOPBiome
|
||||||
{
|
{
|
||||||
super(id);
|
super(id);
|
||||||
|
|
||||||
//TODO: setHeight()
|
|
||||||
this.setHeight(biomeHeight);
|
this.setHeight(biomeHeight);
|
||||||
//TODO: setColor()
|
|
||||||
this.setColor(14193503);
|
this.setColor(14193503);
|
||||||
this.setTemperatureRainfall(0.8F, 0.9F);
|
this.setTemperatureRainfall(0.8F, 0.9F);
|
||||||
|
|
||||||
|
@ -39,20 +34,25 @@ public class BiomeGenBog extends BOPBiome
|
||||||
this.theBiomeDecorator.sandPerChunk = -999;
|
this.theBiomeDecorator.sandPerChunk = -999;
|
||||||
this.theBiomeDecorator.sandPerChunk2 = -999;
|
this.theBiomeDecorator.sandPerChunk2 = -999;
|
||||||
|
|
||||||
this.bopWorldFeatures.bushesPerChunk = 6;
|
this.bopWorldFeatures.setFeature("bushesPerChunk", 6);
|
||||||
this.bopWorldFeatures.mudPerChunk = 2;
|
this.bopWorldFeatures.setFeature("mudPerChunk", 2);
|
||||||
this.bopWorldFeatures.algaePerChunk = 2;
|
this.bopWorldFeatures.setFeature("algaePerChunk", 2);
|
||||||
this.bopWorldFeatures.riverCanePerChunk = 8;
|
this.bopWorldFeatures.setFeature("riverCanePerChunk", 8);
|
||||||
this.bopWorldFeatures.blueMilksPerChunk = 1;
|
this.bopWorldFeatures.setFeature("blueMilksPerChunk", 1);
|
||||||
this.bopWorldFeatures.waterLakesPerChunk = 6;
|
this.bopWorldFeatures.setFeature("waterLakesPerChunk", 6);
|
||||||
//TODO: FEATURE this.bopWorldFeatures.poisonWaterPerChunk = 2;
|
//TODO: FEATURE this.bopWorldFeatures.poisonWaterPerChunk = 2;
|
||||||
this.bopWorldFeatures.waterReedsPerChunk = 8;
|
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 8);
|
||||||
this.bopWorldFeatures.koruPerChunk = 1;
|
this.bopWorldFeatures.setFeature("koruPerChunk", 1);
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 10;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 10);
|
||||||
this.bopWorldFeatures.leafPilesPerChunk = 15;
|
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 15);
|
||||||
this.bopWorldFeatures.deadLeafPilesPerChunk = 8;
|
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 8);
|
||||||
this.bopWorldFeatures.seaweedPerChunk = 15;
|
this.bopWorldFeatures.setFeature("seaweedPerChunk", 15);
|
||||||
this.bopWorldFeatures.generatePumpkins = false;
|
this.bopWorldFeatures.setFeature("generatePumpkins", false);
|
||||||
|
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 1D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -68,12 +68,10 @@ public class BiomeGenBog extends BOPBiome
|
||||||
int y = random.nextInt(28) + 4;
|
int y = random.nextInt(28) + 4;
|
||||||
int z = chunkZ + random.nextInt(16);
|
int z = chunkZ + random.nextInt(16);
|
||||||
|
|
||||||
//TODO: getBlock()
|
|
||||||
Block block = world.getBlock(x, y, z);
|
Block block = world.getBlock(x, y, z);
|
||||||
|
|
||||||
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
||||||
{
|
{
|
||||||
//TODO: setBlock()
|
|
||||||
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 6, 2);
|
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 6, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -89,34 +87,18 @@ public class BiomeGenBog extends BOPBiome
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getRandomWorldGenForTrees()
|
|
||||||
public WorldGenAbstractTree func_150567_a(Random random)
|
public WorldGenAbstractTree func_150567_a(Random random)
|
||||||
{
|
{
|
||||||
return random.nextInt(3) == 0 ? new WorldGenCypress(Blocks.log2, Blocks.leaves2, 1, 1, false, 8, 5, 0) : (random.nextInt(6) == 0 ? new WorldGenCypress(Blocks.log, Blocks.leaves, 2, 2, false, 4, 4, 1) : new WorldGenBogBush());
|
return random.nextInt(3) == 0 ? new WorldGenCypress(Blocks.log2, Blocks.leaves2, 1, 1, false, 8, 5, 0) : (random.nextInt(6) == 0 ? new WorldGenCypress(Blocks.log, Blocks.leaves, 2, 2, false, 4, 4, 1) : new WorldGenBogBush());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 1D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
//TODO: getBiomeGrassColor()
|
|
||||||
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
||||||
{
|
{
|
||||||
return 14193503;
|
return 14193503;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeFoliageColor()
|
|
||||||
public int getBiomeFoliageColor(int x, int y, int z)
|
public int getBiomeFoliageColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 14345593;
|
return 14345593;
|
||||||
|
|
|
@ -1,21 +1,18 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import java.util.Random;
|
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
||||||
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
|
import biomesoplenty.common.world.features.trees.WorldGenBOPTaiga2;
|
||||||
|
import biomesoplenty.common.world.features.trees.WorldGenOriginalTree;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.entity.passive.EntityWolf;
|
import net.minecraft.entity.passive.EntityWolf;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
import net.minecraft.world.gen.feature.WorldGenShrub;
|
import net.minecraft.world.gen.feature.WorldGenShrub;
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import java.util.Random;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBOPTaiga2;
|
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenOriginalTree;
|
|
||||||
|
|
||||||
public class BiomeGenBorealForest extends BOPBiome
|
public class BiomeGenBorealForest extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -25,9 +22,7 @@ public class BiomeGenBorealForest extends BOPBiome
|
||||||
{
|
{
|
||||||
super(id);
|
super(id);
|
||||||
|
|
||||||
//TODO: setHeight()
|
|
||||||
this.setHeight(biomeHeight);
|
this.setHeight(biomeHeight);
|
||||||
//TODO: setColor()
|
|
||||||
this.setColor(10467185);
|
this.setColor(10467185);
|
||||||
this.setTemperatureRainfall(0.6F, 0.7F);
|
this.setTemperatureRainfall(0.6F, 0.7F);
|
||||||
|
|
||||||
|
@ -36,43 +31,26 @@ public class BiomeGenBorealForest extends BOPBiome
|
||||||
this.theBiomeDecorator.treesPerChunk = 20;
|
this.theBiomeDecorator.treesPerChunk = 20;
|
||||||
this.theBiomeDecorator.grassPerChunk = 50;
|
this.theBiomeDecorator.grassPerChunk = 50;
|
||||||
|
|
||||||
this.bopWorldFeatures.bopFlowersPerChunk = 5;
|
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 5);
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 10;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 10);
|
||||||
this.bopWorldFeatures.waterReedsPerChunk = 4;
|
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 4);
|
||||||
this.bopWorldFeatures.deadLeafPilesPerChunk = 10;
|
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 10);
|
||||||
|
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(4, 5), 10);
|
||||||
|
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 2D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getRandomWorldGenForTrees()
|
|
||||||
public WorldGenAbstractTree func_150567_a(Random random)
|
public WorldGenAbstractTree func_150567_a(Random random)
|
||||||
{
|
{
|
||||||
return random.nextInt(4) == 0 ? new WorldGenOriginalTree(Blocks.log, Blocks.leaves, 0, 0, false, 8, 2, false) : (random.nextInt(5) == 0 ? new WorldGenShrub(0,0) : (random.nextInt(3) == 0 ? new WorldGenOriginalTree(Blocks.log, BOPBlockHelper.get("leaves1"), 2, 0, false, 5, 3, false) :
|
return random.nextInt(4) == 0 ? new WorldGenOriginalTree(Blocks.log, Blocks.leaves, 0, 0, false, 8, 2, false) : (random.nextInt(5) == 0 ? new WorldGenShrub(0,0) : (random.nextInt(3) == 0 ? new WorldGenOriginalTree(Blocks.log, BOPBlockHelper.get("leaves1"), 2, 0, false, 5, 3, false) :
|
||||||
(random.nextInt(3) == 0 ? worldGeneratorTrees : new WorldGenBOPTaiga2(Blocks.log, Blocks.leaves, 1, 1, false, 13, 9, 2))));
|
(random.nextInt(3) == 0 ? worldGeneratorTrees : new WorldGenBOPTaiga2(Blocks.log, Blocks.leaves, 1, 1, false, 13, 9, 2))));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenBOPFlora, Integer> getWeightedWorldGenForBOPFlowers()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenBOPFlora, Integer> flowerMap = new HashMap();
|
|
||||||
|
|
||||||
flowerMap.put(new WorldGenBOPDoubleFlora(4, 5), 10);
|
|
||||||
|
|
||||||
return flowerMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 2D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
||||||
{
|
{
|
||||||
|
@ -85,26 +63,22 @@ public class BiomeGenBorealForest extends BOPBiome
|
||||||
int y = random.nextInt(28) + 4;
|
int y = random.nextInt(28) + 4;
|
||||||
int z = chunkZ + random.nextInt(16);
|
int z = chunkZ + random.nextInt(16);
|
||||||
|
|
||||||
//TODO: getBlock()
|
|
||||||
Block block = world.getBlock(x, y, z);
|
Block block = world.getBlock(x, y, z);
|
||||||
|
|
||||||
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
||||||
{
|
{
|
||||||
//TODO: setBlock()
|
|
||||||
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 0, 2);
|
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 0, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeGrassColor()
|
public int getBiomeGrassColor(int x, int y, int z)
|
||||||
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
|
||||||
{
|
{
|
||||||
return 10467185;
|
return 10467185;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeFoliageColor()
|
|
||||||
public int getBiomeFoliageColor(int x, int y, int z)
|
public int getBiomeFoliageColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 13225573;
|
return 13225573;
|
||||||
|
|
|
@ -1,17 +1,15 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBrush1;
|
import biomesoplenty.common.world.features.trees.WorldGenBrush1;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBrush2;
|
import biomesoplenty.common.world.features.trees.WorldGenBrush2;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenMiniShrub;
|
import biomesoplenty.common.world.features.trees.WorldGenMiniShrub;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenBrushland extends BOPBiome
|
public class BiomeGenBrushland extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -21,9 +19,7 @@ public class BiomeGenBrushland extends BOPBiome
|
||||||
{
|
{
|
||||||
super(id);
|
super(id);
|
||||||
|
|
||||||
//TODO: setHeight()
|
|
||||||
this.setHeight(biomeHeight);
|
this.setHeight(biomeHeight);
|
||||||
//TODO: setColor()
|
|
||||||
this.setColor(13222271);
|
this.setColor(13222271);
|
||||||
this.setTemperatureRainfall(2.0F, 0.05F);
|
this.setTemperatureRainfall(2.0F, 0.05F);
|
||||||
|
|
||||||
|
@ -31,11 +27,17 @@ public class BiomeGenBrushland extends BOPBiome
|
||||||
this.theBiomeDecorator.grassPerChunk = 6;
|
this.theBiomeDecorator.grassPerChunk = 6;
|
||||||
this.theBiomeDecorator.flowersPerChunk = -999;
|
this.theBiomeDecorator.flowersPerChunk = -999;
|
||||||
|
|
||||||
this.bopWorldFeatures.bopFlowersPerChunk = 5;
|
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 5);
|
||||||
this.bopWorldFeatures.thornsPerChunk = 4;
|
this.bopWorldFeatures.setFeature("thornsPerChunk", 4);
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 30;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 30);
|
||||||
this.bopWorldFeatures.waterReedsPerChunk = 2;
|
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 2);
|
||||||
this.bopWorldFeatures.generateQuicksand = true;
|
this.bopWorldFeatures.setFeature("generateQuicksand", true);
|
||||||
|
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 2), 5);
|
||||||
|
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -46,36 +48,12 @@ public class BiomeGenBrushland extends BOPBiome
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HashMap<WorldGenBOPFlora, Integer> getWeightedWorldGenForBOPFlowers()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenBOPFlora, Integer> flowerMap = new HashMap();
|
|
||||||
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(Blocks.red_flower, 2), 5);
|
|
||||||
|
|
||||||
return flowerMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
//TODO: getBiomeGrassColor()
|
|
||||||
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
||||||
{
|
{
|
||||||
return 13222271;
|
return 13222271;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeFoliageColor()
|
|
||||||
public int getBiomeFoliageColor(int x, int y, int z)
|
public int getBiomeFoliageColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 11716223;
|
return 11716223;
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBOPShrub;
|
import biomesoplenty.common.world.features.trees.WorldGenBOPShrub;
|
||||||
|
@ -10,10 +7,9 @@ import biomesoplenty.common.world.features.trees.WorldGenPineTree;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
|
||||||
import net.minecraft.world.biome.BiomeGenBase.Height;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenCanyon extends BOPBiome
|
public class BiomeGenCanyon extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -37,10 +33,12 @@ public class BiomeGenCanyon extends BOPBiome
|
||||||
this.theBiomeDecorator.treesPerChunk = 7;
|
this.theBiomeDecorator.treesPerChunk = 7;
|
||||||
this.theBiomeDecorator.flowersPerChunk = -999;
|
this.theBiomeDecorator.flowersPerChunk = -999;
|
||||||
|
|
||||||
this.bopWorldFeatures.bromeliadsPerChunk = 2;
|
this.bopWorldFeatures.setFeature("bromeliadsPerChunk", 2);
|
||||||
this.bopWorldFeatures.waterReedsPerChunk = 2;
|
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 2);
|
||||||
this.bopWorldFeatures.generatePumpkins = false;
|
this.bopWorldFeatures.setFeature("generatePumpkins", false);
|
||||||
this.bopWorldFeatures.generateCanyon = true;
|
this.bopWorldFeatures.setFeature("generateCanyon", true);
|
||||||
|
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 1D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -50,16 +48,6 @@ public class BiomeGenCanyon extends BOPBiome
|
||||||
return random.nextInt(9) == 0 ? new WorldGenPineTree() : new WorldGenBOPShrub(Blocks.log2, Blocks.leaves2, 0, 0, 86, 96, BOPBlockHelper.get("hardDirt"));
|
return random.nextInt(9) == 0 ? new WorldGenPineTree() : new WorldGenBOPShrub(Blocks.log2, Blocks.leaves2, 0, 0, 86, 96, BOPBlockHelper.get("hardDirt"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 1D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
||||||
{
|
{
|
||||||
|
@ -72,12 +60,10 @@ public class BiomeGenCanyon extends BOPBiome
|
||||||
int y = random.nextInt(28) + 4;
|
int y = random.nextInt(28) + 4;
|
||||||
int z = chunkZ + random.nextInt(16);
|
int z = chunkZ + random.nextInt(16);
|
||||||
|
|
||||||
//TODO: getBlock()
|
|
||||||
Block block = world.getBlock(x, y, z);
|
Block block = world.getBlock(x, y, z);
|
||||||
|
|
||||||
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
||||||
{
|
{
|
||||||
//TODO: setBlock()
|
|
||||||
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 2, 2);
|
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 2, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,22 +1,18 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import java.util.Random;
|
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
||||||
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
|
import biomesoplenty.common.world.features.trees.WorldGenBOPShrub;
|
||||||
|
import biomesoplenty.common.world.features.trees.WorldGenChaparral3;
|
||||||
|
import biomesoplenty.common.world.features.trees.WorldGenMiniShrub;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.entity.passive.EntityHorse;
|
import net.minecraft.entity.passive.EntityHorse;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.biome.BiomeGenBase.Height;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import java.util.Random;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBOPShrub;
|
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenMiniShrub;
|
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenChaparral3;
|
|
||||||
|
|
||||||
public class BiomeGenChaparral extends BOPBiome
|
public class BiomeGenChaparral extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -26,9 +22,7 @@ public class BiomeGenChaparral extends BOPBiome
|
||||||
{
|
{
|
||||||
super(id);
|
super(id);
|
||||||
|
|
||||||
//TODO: setHeight()
|
|
||||||
this.setHeight(biomeHeight);
|
this.setHeight(biomeHeight);
|
||||||
//TODO: setColor()
|
|
||||||
this.setColor(12638301);
|
this.setColor(12638301);
|
||||||
this.setTemperatureRainfall(0.8F, 0.4F);
|
this.setTemperatureRainfall(0.8F, 0.4F);
|
||||||
|
|
||||||
|
@ -39,15 +33,23 @@ public class BiomeGenChaparral extends BOPBiome
|
||||||
this.theBiomeDecorator.treesPerChunk = 8;
|
this.theBiomeDecorator.treesPerChunk = 8;
|
||||||
this.theBiomeDecorator.grassPerChunk = 20;
|
this.theBiomeDecorator.grassPerChunk = 20;
|
||||||
|
|
||||||
this.bopWorldFeatures.bopFlowersPerChunk = 5;
|
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 5);
|
||||||
this.bopWorldFeatures.bushesPerChunk = 10;
|
this.bopWorldFeatures.setFeature("bushesPerChunk", 10);
|
||||||
this.bopWorldFeatures.berryBushesPerChunk = 2;
|
this.bopWorldFeatures.setFeature("berryBushesPerChunk", 2);
|
||||||
this.bopWorldFeatures.generateStoneInGrass = true;
|
this.bopWorldFeatures.setFeature("generateStoneInGrass", true);
|
||||||
this.bopWorldFeatures.wildCarrotsPerChunk = 1;
|
this.bopWorldFeatures.setFeature("wildCarrotsPerChunk", 1);
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 10;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 10);
|
||||||
this.bopWorldFeatures.waterReedsPerChunk = 2;
|
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 2);
|
||||||
this.bopWorldFeatures.leafPilesPerChunk = 10;
|
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 10);
|
||||||
this.bopWorldFeatures.generatePumpkins = false;
|
this.bopWorldFeatures.setFeature("generatePumpkins", false);
|
||||||
|
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(4, 5), 8);
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(1, 5), 4);
|
||||||
|
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -57,30 +59,6 @@ public class BiomeGenChaparral extends BOPBiome
|
||||||
return random.nextInt(2) == 0 ? new WorldGenMiniShrub(Blocks.log, Blocks.leaves, 0, 0, Blocks.grass, Blocks.sand) : (random.nextInt(5) == 0 ? new WorldGenBOPShrub(Blocks.log, Blocks.leaves, 0, 0, Blocks.grass, Blocks.sand) : new WorldGenChaparral3());
|
return random.nextInt(2) == 0 ? new WorldGenMiniShrub(Blocks.log, Blocks.leaves, 0, 0, Blocks.grass, Blocks.sand) : (random.nextInt(5) == 0 ? new WorldGenBOPShrub(Blocks.log, Blocks.leaves, 0, 0, Blocks.grass, Blocks.sand) : new WorldGenChaparral3());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenBOPFlora, Integer> getWeightedWorldGenForBOPFlowers()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenBOPFlora, Integer> flowerMap = new HashMap();
|
|
||||||
|
|
||||||
flowerMap.put(new WorldGenBOPDoubleFlora(4, 5), 8);
|
|
||||||
flowerMap.put(new WorldGenBOPDoubleFlora(1, 5), 4);
|
|
||||||
|
|
||||||
return flowerMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,19 +1,16 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.biome.BiomeGenBase.Height;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBOPBigTree;
|
import biomesoplenty.common.world.features.trees.WorldGenBOPBigTree;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenCherryBlossomGrove extends BOPBiome
|
public class BiomeGenCherryBlossomGrove extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -33,11 +30,20 @@ public class BiomeGenCherryBlossomGrove extends BOPBiome
|
||||||
this.theBiomeDecorator.grassPerChunk = 15;
|
this.theBiomeDecorator.grassPerChunk = 15;
|
||||||
this.theBiomeDecorator.flowersPerChunk = -999;
|
this.theBiomeDecorator.flowersPerChunk = -999;
|
||||||
|
|
||||||
this.bopWorldFeatures.bopFlowersPerChunk = 10;
|
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 10);
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 2;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 2);
|
||||||
this.bopWorldFeatures.cloverPatchesPerChunk = 15;
|
this.bopWorldFeatures.setFeature("cloverPatchesPerChunk", 15);
|
||||||
this.bopWorldFeatures.leafPilesPerChunk = 15;
|
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 15);
|
||||||
this.bopWorldFeatures.generatePumpkins = false;
|
this.bopWorldFeatures.setFeature("generatePumpkins", false);
|
||||||
|
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 6), 12);
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 9), 8);
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 0), 6);
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(1, 5), 4);
|
||||||
|
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -47,31 +53,6 @@ public class BiomeGenCherryBlossomGrove extends BOPBiome
|
||||||
return random.nextInt(3) == 0 ? new WorldGenBOPBigTree(BOPBlockHelper.get("logs1"), BOPBlockHelper.get("leaves3"), 1, 3) : new WorldGenBOPBigTree(BOPBlockHelper.get("logs1"), BOPBlockHelper.get("leaves3"), 1, 1);
|
return random.nextInt(3) == 0 ? new WorldGenBOPBigTree(BOPBlockHelper.get("logs1"), BOPBlockHelper.get("leaves3"), 1, 3) : new WorldGenBOPBigTree(BOPBlockHelper.get("logs1"), BOPBlockHelper.get("leaves3"), 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenBOPFlora, Integer> getWeightedWorldGenForBOPFlowers()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenBOPFlora, Integer> flowerMap = new HashMap();
|
|
||||||
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 6), 12);
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 9), 8);
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 0), 6);
|
|
||||||
flowerMap.put(new WorldGenBOPDoubleFlora(1, 5), 4);
|
|
||||||
|
|
||||||
return flowerMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
||||||
{
|
{
|
||||||
|
@ -84,12 +65,10 @@ public class BiomeGenCherryBlossomGrove extends BOPBiome
|
||||||
int y = random.nextInt(28) + 4;
|
int y = random.nextInt(28) + 4;
|
||||||
int z = chunkZ + random.nextInt(16);
|
int z = chunkZ + random.nextInt(16);
|
||||||
|
|
||||||
//TODO: getBlock()
|
|
||||||
Block block = world.getBlock(x, y, z);
|
Block block = world.getBlock(x, y, z);
|
||||||
|
|
||||||
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
||||||
{
|
{
|
||||||
//TODO: setBlock()
|
|
||||||
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 6, 2);
|
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 6, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,19 +1,17 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.entity.passive.EntityWolf;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBOPTaiga2;
|
import biomesoplenty.common.world.features.trees.WorldGenBOPTaiga2;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBOPTaiga3;
|
import biomesoplenty.common.world.features.trees.WorldGenBOPTaiga3;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.entity.passive.EntityWolf;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenConiferousForest extends BOPBiome
|
public class BiomeGenConiferousForest extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -38,14 +36,21 @@ public class BiomeGenConiferousForest extends BOPBiome
|
||||||
this.theBiomeDecorator.sandPerChunk = -999;
|
this.theBiomeDecorator.sandPerChunk = -999;
|
||||||
this.theBiomeDecorator.sandPerChunk2 = -999;
|
this.theBiomeDecorator.sandPerChunk2 = -999;
|
||||||
|
|
||||||
this.bopWorldFeatures.toadstoolsPerChunk = 3;
|
this.bopWorldFeatures.setFeature("toadstoolsPerChunk", 3);
|
||||||
this.bopWorldFeatures.blueMilksPerChunk = 1;
|
this.bopWorldFeatures.setFeature("blueMilksPerChunk", 1);
|
||||||
this.bopWorldFeatures.poisonIvyPerChunk = 1;
|
this.bopWorldFeatures.setFeature("poisonIvyPerChunk", 1);
|
||||||
this.bopWorldFeatures.berryBushesPerChunk = 1;
|
this.bopWorldFeatures.setFeature("berryBushesPerChunk", 1);
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 8;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 8);
|
||||||
this.bopWorldFeatures.waterReedsPerChunk = 2;
|
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 2);
|
||||||
this.bopWorldFeatures.cloverPatchesPerChunk = 10;
|
this.bopWorldFeatures.setFeature("cloverPatchesPerChunk", 10);
|
||||||
this.bopWorldFeatures.seaweedPerChunk = 5;
|
this.bopWorldFeatures.setFeature("seaweedPerChunk", 5);
|
||||||
|
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 1D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPDoubleFlora(3, 64), 0.5D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -57,21 +62,6 @@ public class BiomeGenConiferousForest extends BOPBiome
|
||||||
new WorldGenBOPTaiga2(BOPBlockHelper.get("logs1"), BOPBlockHelper.get("leaves2"), 3, 1, false, 10, 10, 5));
|
new WorldGenBOPTaiga2(BOPBlockHelper.get("logs1"), BOPBlockHelper.get("leaves2"), 3, 1, false, 10, 10, 5));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 1D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPDoubleFlora(3, 64), 0.5D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
||||||
|
@ -12,10 +9,9 @@ import biomesoplenty.common.world.features.trees.WorldGenBOPTaiga3;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
|
||||||
import net.minecraft.world.biome.BiomeGenBase.Height;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenConiferousForestSnow extends BOPBiome
|
public class BiomeGenConiferousForestSnow extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -40,8 +36,17 @@ public class BiomeGenConiferousForestSnow extends BOPBiome
|
||||||
this.theBiomeDecorator.sandPerChunk = -999;
|
this.theBiomeDecorator.sandPerChunk = -999;
|
||||||
this.theBiomeDecorator.sandPerChunk2 = -999;
|
this.theBiomeDecorator.sandPerChunk2 = -999;
|
||||||
|
|
||||||
this.bopWorldFeatures.bopFlowersPerChunk = 3;
|
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 3);
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 4;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 4);
|
||||||
|
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 8), 8);
|
||||||
|
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 1D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 0.25D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPDoubleFlora(3, 64), 0.25D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -53,31 +58,6 @@ public class BiomeGenConiferousForestSnow extends BOPBiome
|
||||||
new WorldGenBOPTaiga2(BOPBlockHelper.get("logs1"), BOPBlockHelper.get("leaves2"), 3, 1, false, 10, 10, 5));
|
new WorldGenBOPTaiga2(BOPBlockHelper.get("logs1"), BOPBlockHelper.get("leaves2"), 3, 1, false, 10, 10, 5));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenBOPFlora, Integer> getWeightedWorldGenForBOPFlowers()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenBOPFlora, Integer> flowerMap = new HashMap();
|
|
||||||
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 8), 8);
|
|
||||||
|
|
||||||
return flowerMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 1D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 0.25D);
|
|
||||||
grassMap.put(new WorldGenBOPDoubleFlora(3, 64), 0.25D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.Random;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
|
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
|
||||||
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenCrag extends BOPBiome
|
public class BiomeGenCrag extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -16,9 +16,7 @@ public class BiomeGenCrag extends BOPBiome
|
||||||
{
|
{
|
||||||
super(id);
|
super(id);
|
||||||
|
|
||||||
//TODO: setHeight()
|
|
||||||
this.setHeight(biomeHeight);
|
this.setHeight(biomeHeight);
|
||||||
//TODO: setColor()
|
|
||||||
this.setColor(5209457);
|
this.setColor(5209457);
|
||||||
this.setTemperatureRainfall(2.0F, 0.0F);
|
this.setTemperatureRainfall(2.0F, 0.0F);
|
||||||
|
|
||||||
|
@ -29,7 +27,6 @@ public class BiomeGenCrag extends BOPBiome
|
||||||
this.fillerBlock = BOPBlockHelper.get("cragRock");
|
this.fillerBlock = BOPBlockHelper.get("cragRock");
|
||||||
this.theBiomeDecorator.treesPerChunk = -999;
|
this.theBiomeDecorator.treesPerChunk = -999;
|
||||||
|
|
||||||
|
|
||||||
this.waterColorMultiplier = 944693;
|
this.waterColorMultiplier = 944693;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,18 +1,15 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.biome.BiomeGenBase.Height;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBOPTaiga2;
|
import biomesoplenty.common.world.features.trees.WorldGenBOPTaiga2;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenDeadTree1;
|
import biomesoplenty.common.world.features.trees.WorldGenDeadTree1;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenOriginalTree;
|
import biomesoplenty.common.world.features.trees.WorldGenOriginalTree;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenDeadForest extends BOPBiome
|
public class BiomeGenDeadForest extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -22,9 +19,7 @@ public class BiomeGenDeadForest extends BOPBiome
|
||||||
{
|
{
|
||||||
super(id);
|
super(id);
|
||||||
|
|
||||||
//TODO: setHeight()
|
|
||||||
this.setHeight(biomeHeight);
|
this.setHeight(biomeHeight);
|
||||||
//TODO: setColor()
|
|
||||||
this.setColor(12362085);
|
this.setColor(12362085);
|
||||||
this.setTemperatureRainfall(0.2F, 0.8F);
|
this.setTemperatureRainfall(0.2F, 0.8F);
|
||||||
|
|
||||||
|
@ -33,23 +28,15 @@ public class BiomeGenDeadForest extends BOPBiome
|
||||||
this.theBiomeDecorator.flowersPerChunk = -999;
|
this.theBiomeDecorator.flowersPerChunk = -999;
|
||||||
this.theBiomeDecorator.reedsPerChunk = -999;
|
this.theBiomeDecorator.reedsPerChunk = -999;
|
||||||
|
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 2;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 2);
|
||||||
this.bopWorldFeatures.thornsPerChunk = 2;
|
this.bopWorldFeatures.setFeature("thornsPerChunk", 2);
|
||||||
this.bopWorldFeatures.waterReedsPerChunk = 2;
|
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 2);
|
||||||
this.bopWorldFeatures.deadLeafPilesPerChunk = 20;
|
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 20);
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 0), 0.5D);
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
||||||
{
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 0), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -62,14 +49,12 @@ public class BiomeGenDeadForest extends BOPBiome
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeGrassColor()
|
|
||||||
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
||||||
{
|
{
|
||||||
return 12362085;
|
return 12362085;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeFoliageColor()
|
|
||||||
public int getBiomeFoliageColor(int x, int y, int z)
|
public int getBiomeFoliageColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 12362085;
|
return 12362085;
|
||||||
|
|
|
@ -1,19 +1,16 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.biome.BiomeGenBase.Height;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenDeadTree1;
|
import biomesoplenty.common.world.features.trees.WorldGenDeadTree1;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenDeadSwamp extends BOPBiome
|
public class BiomeGenDeadSwamp extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -41,25 +38,17 @@ public class BiomeGenDeadSwamp extends BOPBiome
|
||||||
this.theBiomeDecorator.sandPerChunk = -999;
|
this.theBiomeDecorator.sandPerChunk = -999;
|
||||||
this.theBiomeDecorator.sandPerChunk2 = -999;
|
this.theBiomeDecorator.sandPerChunk2 = -999;
|
||||||
|
|
||||||
this.bopWorldFeatures.mudPerChunk = 3;
|
this.bopWorldFeatures.setFeature("mudPerChunk", 3);
|
||||||
this.bopWorldFeatures.riverCanePerChunk = 2;
|
this.bopWorldFeatures.setFeature("riverCanePerChunk", 2);
|
||||||
this.bopWorldFeatures.waterReedsPerChunk = 4;
|
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 4);
|
||||||
this.bopWorldFeatures.koruPerChunk = 1;
|
this.bopWorldFeatures.setFeature("koruPerChunk", 1);
|
||||||
this.bopWorldFeatures.seaweedPerChunk = 5;
|
this.bopWorldFeatures.setFeature("seaweedPerChunk", 5);
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 1D);
|
||||||
{
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPDoubleFlora(2), 0.25D);
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 1D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPDoubleFlora(2), 0.25D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,18 +1,15 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.biome.BiomeGenBase.Height;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenShrub;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBulbTree;
|
import biomesoplenty.common.world.features.trees.WorldGenBulbTree;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenShrub;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenDeciduousForest extends BOPBiome
|
public class BiomeGenDeciduousForest extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -31,15 +28,20 @@ public class BiomeGenDeciduousForest extends BOPBiome
|
||||||
this.theBiomeDecorator.grassPerChunk = 10;
|
this.theBiomeDecorator.grassPerChunk = 10;
|
||||||
this.theBiomeDecorator.flowersPerChunk = -999;
|
this.theBiomeDecorator.flowersPerChunk = -999;
|
||||||
|
|
||||||
this.bopWorldFeatures.toadstoolsPerChunk = 1;
|
this.bopWorldFeatures.setFeature("toadstoolsPerChunk", 1);
|
||||||
this.bopWorldFeatures.bushesPerChunk = 8;
|
this.bopWorldFeatures.setFeature("bushesPerChunk", 8);
|
||||||
this.bopWorldFeatures.berryBushesPerChunk = 2;
|
this.bopWorldFeatures.setFeature("berryBushesPerChunk", 2);
|
||||||
this.bopWorldFeatures.blueMilksPerChunk = 2;
|
this.bopWorldFeatures.setFeature("blueMilksPerChunk", 2);
|
||||||
this.bopWorldFeatures.poisonIvyPerChunk = 1;
|
this.bopWorldFeatures.setFeature("poisonIvyPerChunk", 1);
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 10;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 10);
|
||||||
this.bopWorldFeatures.waterReedsPerChunk = 2;
|
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 2);
|
||||||
this.bopWorldFeatures.leafPilesPerChunk = 10;
|
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 10);
|
||||||
this.bopWorldFeatures.deadLeafPilesPerChunk = 10;
|
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 10);
|
||||||
|
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 1D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -49,19 +51,6 @@ public class BiomeGenDeciduousForest extends BOPBiome
|
||||||
return random.nextInt(4) == 0 ? new WorldGenShrub(2,2) : new WorldGenBulbTree(Blocks.log, Blocks.leaves, 0, 0, false, 10, 15, false);
|
return random.nextInt(4) == 0 ? new WorldGenShrub(2,2) : new WorldGenBulbTree(Blocks.log, Blocks.leaves, 0, 0, false, 10, 15, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 1D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
||||||
|
@ -75,26 +64,22 @@ public class BiomeGenDeciduousForest extends BOPBiome
|
||||||
int y = random.nextInt(28) + 4;
|
int y = random.nextInt(28) + 4;
|
||||||
int z = chunkZ + random.nextInt(16);
|
int z = chunkZ + random.nextInt(16);
|
||||||
|
|
||||||
//TODO: getBlock()
|
|
||||||
Block block = world.getBlock(x, y, z);
|
Block block = world.getBlock(x, y, z);
|
||||||
|
|
||||||
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
||||||
{
|
{
|
||||||
//TODO: setBlock()
|
|
||||||
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 0, 2);
|
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 0, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeGrassColor()
|
|
||||||
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
||||||
{
|
{
|
||||||
return 12695369;
|
return 12695369;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeFoliageColor()
|
|
||||||
public int getBiomeFoliageColor(int x, int y, int z)
|
public int getBiomeFoliageColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 12896570;
|
return 12896570;
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.Random;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.biome.BiomeGenBase.Height;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenDunes extends BOPBiome
|
public class BiomeGenDunes extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -35,9 +34,9 @@ public class BiomeGenDunes extends BOPBiome
|
||||||
this.theBiomeDecorator.grassPerChunk = 75;
|
this.theBiomeDecorator.grassPerChunk = 75;
|
||||||
this.theBiomeDecorator.generateLakes = false;
|
this.theBiomeDecorator.generateLakes = false;
|
||||||
|
|
||||||
this.bopWorldFeatures.desertSproutsPerChunk = 25;
|
this.bopWorldFeatures.setFeature("desertSproutsPerChunk", 25);
|
||||||
this.bopWorldFeatures.bromeliadsPerChunk = 5;
|
this.bopWorldFeatures.setFeature("bromeliadsPerChunk", 5);
|
||||||
this.bopWorldFeatures.waterReedsPerChunk = 4;
|
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -58,12 +57,10 @@ public class BiomeGenDunes extends BOPBiome
|
||||||
int y = random.nextInt(28) + 4;
|
int y = random.nextInt(28) + 4;
|
||||||
int z = chunkZ + random.nextInt(16);
|
int z = chunkZ + random.nextInt(16);
|
||||||
|
|
||||||
//TODO: getBlock()
|
|
||||||
Block block = world.getBlock(x, y, z);
|
Block block = world.getBlock(x, y, z);
|
||||||
|
|
||||||
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
||||||
{
|
{
|
||||||
//TODO: setBlock()
|
|
||||||
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 2, 2);
|
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 2, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,5 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.entity.monster.EntitySlime;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
||||||
|
@ -17,6 +8,13 @@ import biomesoplenty.common.world.features.WorldGenMoss;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBOPTaiga1;
|
import biomesoplenty.common.world.features.trees.WorldGenBOPTaiga1;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBOPTaiga2;
|
import biomesoplenty.common.world.features.trees.WorldGenBOPTaiga2;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenDeadTree1;
|
import biomesoplenty.common.world.features.trees.WorldGenDeadTree1;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.entity.monster.EntitySlime;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenFen extends BOPBiome
|
public class BiomeGenFen extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -26,9 +24,7 @@ public class BiomeGenFen extends BOPBiome
|
||||||
{
|
{
|
||||||
super(id);
|
super(id);
|
||||||
|
|
||||||
//TODO: setHeight()
|
|
||||||
this.setHeight(biomeHeight);
|
this.setHeight(biomeHeight);
|
||||||
//TODO: setColor()
|
|
||||||
this.setColor(12240001);
|
this.setColor(12240001);
|
||||||
this.setTemperatureRainfall(0.4F, 0.4F);
|
this.setTemperatureRainfall(0.4F, 0.4F);
|
||||||
|
|
||||||
|
@ -40,20 +36,29 @@ public class BiomeGenFen extends BOPBiome
|
||||||
this.theBiomeDecorator.sandPerChunk = -999;
|
this.theBiomeDecorator.sandPerChunk = -999;
|
||||||
this.theBiomeDecorator.sandPerChunk2 = -999;
|
this.theBiomeDecorator.sandPerChunk2 = -999;
|
||||||
|
|
||||||
this.bopWorldFeatures.bopFlowersPerChunk = 5;
|
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 5);
|
||||||
this.bopWorldFeatures.cattailsPerChunk = 1;
|
this.bopWorldFeatures.setFeature("cattailsPerChunk", 1);
|
||||||
this.bopWorldFeatures.highCattailsPerChunk = 1;
|
this.bopWorldFeatures.setFeature("highCattailsPerChunk", 1);
|
||||||
this.bopWorldFeatures.waterPoolsPerChunk = 99;
|
this.bopWorldFeatures.setFeature("waterPoolsPerChunk", 99);
|
||||||
this.bopWorldFeatures.toadstoolsPerChunk = 2;
|
this.bopWorldFeatures.setFeature("toadstoolsPerChunk", 2);
|
||||||
this.bopWorldFeatures.mudPerChunk = 1;
|
this.bopWorldFeatures.setFeature("mudPerChunk", 1);
|
||||||
this.bopWorldFeatures.riverCanePerChunk = 5;
|
this.bopWorldFeatures.setFeature("riverCanePerChunk", 5);
|
||||||
this.bopWorldFeatures.algaePerChunk = 1;
|
this.bopWorldFeatures.setFeature("algaePerChunk", 1);
|
||||||
this.bopWorldFeatures.portobellosPerChunk = 1;
|
this.bopWorldFeatures.setFeature("portobellosPerChunk", 1);
|
||||||
this.bopWorldFeatures.waterReedsPerChunk = 10;
|
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 10);
|
||||||
this.bopWorldFeatures.koruPerChunk = 1;
|
this.bopWorldFeatures.setFeature("koruPerChunk", 1);
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 7;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 7);
|
||||||
this.bopWorldFeatures.deadLeafPilesPerChunk = 10;
|
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 10);
|
||||||
this.bopWorldFeatures.seaweedPerChunk = 15;
|
this.bopWorldFeatures.setFeature("seaweedPerChunk", 15);
|
||||||
|
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 2), 6);
|
||||||
|
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 1D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPDoubleFlora(2), 0.25D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -65,31 +70,6 @@ public class BiomeGenFen extends BOPBiome
|
||||||
new WorldGenBOPTaiga1(Blocks.log2, Blocks.leaves2, 1, 1, false, 7, 5, 1));
|
new WorldGenBOPTaiga1(Blocks.log2, Blocks.leaves2, 1, 1, false, 7, 5, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenBOPFlora, Integer> getWeightedWorldGenForBOPFlowers()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenBOPFlora, Integer> flowerMap = new HashMap();
|
|
||||||
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(Blocks.red_flower, 2), 6);
|
|
||||||
|
|
||||||
return flowerMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 1D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPDoubleFlora(2), 0.25D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
||||||
{
|
{
|
||||||
|
@ -102,12 +82,10 @@ public class BiomeGenFen extends BOPBiome
|
||||||
int y = random.nextInt(28) + 4;
|
int y = random.nextInt(28) + 4;
|
||||||
int z = chunkZ + random.nextInt(16);
|
int z = chunkZ + random.nextInt(16);
|
||||||
|
|
||||||
//TODO: getBlock()
|
|
||||||
Block block = world.getBlock(x, y, z);
|
Block block = world.getBlock(x, y, z);
|
||||||
|
|
||||||
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
||||||
{
|
{
|
||||||
//TODO: setBlock()
|
|
||||||
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 10, 2);
|
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 10, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -123,14 +101,12 @@ public class BiomeGenFen extends BOPBiome
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeGrassColor()
|
|
||||||
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
||||||
{
|
{
|
||||||
return 12240001;
|
return 12240001;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeFoliageColor()
|
|
||||||
public int getBiomeFoliageColor(int x, int y, int z)
|
public int getBiomeFoliageColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 13547897;
|
return 13547897;
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.Random;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
|
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
||||||
|
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
import net.minecraft.world.gen.feature.WorldGenTallGrass;
|
import net.minecraft.world.gen.feature.WorldGenTallGrass;
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
|
||||||
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
import java.util.Random;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
|
||||||
|
|
||||||
public class BiomeGenFrostForest extends BOPBiome
|
public class BiomeGenFrostForest extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -33,9 +33,9 @@ public class BiomeGenFrostForest extends BOPBiome
|
||||||
this.theBiomeDecorator.flowersPerChunk = -999;
|
this.theBiomeDecorator.flowersPerChunk = -999;
|
||||||
this.theBiomeDecorator.mushroomsPerChunk = -999;
|
this.theBiomeDecorator.mushroomsPerChunk = -999;
|
||||||
|
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 1;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 1);
|
||||||
this.bopWorldFeatures.bopFlowersPerChunk = 3;
|
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 3);
|
||||||
this.bopWorldFeatures.generatePumpkins = false;
|
this.bopWorldFeatures.setFeature("generatePumpkins", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,19 +1,13 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.entity.passive.EntityChicken;
|
import net.minecraft.entity.passive.*;
|
||||||
import net.minecraft.entity.passive.EntityCow;
|
|
||||||
import net.minecraft.entity.passive.EntityHorse;
|
|
||||||
import net.minecraft.entity.passive.EntityPig;
|
|
||||||
import net.minecraft.entity.passive.EntitySheep;
|
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.gen.feature.WorldGenTallGrass;
|
import net.minecraft.world.gen.feature.WorldGenTallGrass;
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenGrassland extends BOPBiome
|
public class BiomeGenGrassland extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -41,11 +35,17 @@ public class BiomeGenGrassland extends BOPBiome
|
||||||
this.theBiomeDecorator.reedsPerChunk = 35;
|
this.theBiomeDecorator.reedsPerChunk = 35;
|
||||||
this.theBiomeDecorator.mushroomsPerChunk = 20;
|
this.theBiomeDecorator.mushroomsPerChunk = 20;
|
||||||
|
|
||||||
this.bopWorldFeatures.waterLakesPerChunk = 15;
|
this.bopWorldFeatures.setFeature("waterLakesPerChunk", 15);
|
||||||
this.bopWorldFeatures.portobellosPerChunk = 3;
|
this.bopWorldFeatures.setFeature("portobellosPerChunk", 3);
|
||||||
this.bopWorldFeatures.riverCanePerChunk = 5;
|
this.bopWorldFeatures.setFeature("riverCanePerChunk", 5);
|
||||||
this.bopWorldFeatures.waterReedsPerChunk = 2;
|
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 2);
|
||||||
this.bopWorldFeatures.generatePumpkins = false;
|
this.bopWorldFeatures.setFeature("generatePumpkins", false);
|
||||||
|
|
||||||
|
weightedGrassGen.put(new WorldGenTallGrass(BOPBlockHelper.get("foliage"), 1), 0.25D);
|
||||||
|
weightedGrassGen.put(new WorldGenTallGrass(BOPBlockHelper.get("foliage"), 2), 0.25D);
|
||||||
|
weightedGrassGen.put(new WorldGenTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenTallGrass(Blocks.tallgrass, 1), 1D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -60,40 +60,22 @@ public class BiomeGenGrassland extends BOPBiome
|
||||||
int y = random.nextInt(28) + 4;
|
int y = random.nextInt(28) + 4;
|
||||||
int z = chunkZ + random.nextInt(16);
|
int z = chunkZ + random.nextInt(16);
|
||||||
|
|
||||||
//TODO: getBlock()
|
|
||||||
Block block = world.getBlock(x, y, z);
|
Block block = world.getBlock(x, y, z);
|
||||||
|
|
||||||
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
||||||
{
|
{
|
||||||
//TODO: setBlock()
|
|
||||||
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 4, 2);
|
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 4, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenTallGrass(BOPBlockHelper.get("foliage"), 1), 0.25D);
|
|
||||||
grassMap.put(new WorldGenTallGrass(BOPBlockHelper.get("foliage"), 2), 0.25D);
|
|
||||||
grassMap.put(new WorldGenTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
grassMap.put(new WorldGenTallGrass(Blocks.tallgrass, 1), 1D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
//TODO: getBiomeGrassColor()
|
|
||||||
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
||||||
{
|
{
|
||||||
return 8379261;
|
return 8379261;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeFoliageColor()
|
|
||||||
public int getBiomeFoliageColor(int x, int y, int z)
|
public int getBiomeFoliageColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 8379261;
|
return 8379261;
|
||||||
|
|
|
@ -1,13 +1,5 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
||||||
|
@ -15,6 +7,12 @@ import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenMiniShrub;
|
import biomesoplenty.common.world.features.trees.WorldGenMiniShrub;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenPoplar;
|
import biomesoplenty.common.world.features.trees.WorldGenPoplar;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenPoplar2;
|
import biomesoplenty.common.world.features.trees.WorldGenPoplar2;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenGrove extends BOPBiome
|
public class BiomeGenGrove extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -34,12 +32,21 @@ public class BiomeGenGrove extends BOPBiome
|
||||||
this.theBiomeDecorator.flowersPerChunk = 5;
|
this.theBiomeDecorator.flowersPerChunk = 5;
|
||||||
this.theBiomeDecorator.grassPerChunk = 8;
|
this.theBiomeDecorator.grassPerChunk = 8;
|
||||||
|
|
||||||
this.bopWorldFeatures.bopFlowersPerChunk = 50;
|
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 50);
|
||||||
this.bopWorldFeatures.sproutsPerChunk = 1;
|
this.bopWorldFeatures.setFeature("sproutsPerChunk", 1);
|
||||||
this.bopWorldFeatures.berryBushesPerChunk = 2;
|
this.bopWorldFeatures.setFeature("berryBushesPerChunk", 2);
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 3;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 3);
|
||||||
this.bopWorldFeatures.cloverPatchesPerChunk = 20;
|
this.bopWorldFeatures.setFeature("cloverPatchesPerChunk", 20);
|
||||||
this.bopWorldFeatures.generatePumpkins = false;
|
this.bopWorldFeatures.setFeature("generatePumpkins", false);
|
||||||
|
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 0), 16);
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 9), 6);
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(5, 3), 4);
|
||||||
|
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 1D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -49,31 +56,6 @@ public class BiomeGenGrove extends BOPBiome
|
||||||
return random.nextInt(2) == 0 ? new WorldGenMiniShrub(Blocks.log, Blocks.leaves, 0, 0, Blocks.grass, Blocks.sand) : random.nextInt(3) == 0 ? new WorldGenPoplar2() : new WorldGenPoplar();
|
return random.nextInt(2) == 0 ? new WorldGenMiniShrub(Blocks.log, Blocks.leaves, 0, 0, Blocks.grass, Blocks.sand) : random.nextInt(3) == 0 ? new WorldGenPoplar2() : new WorldGenPoplar();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenBOPFlora, Integer> getWeightedWorldGenForBOPFlowers()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenBOPFlora, Integer> flowerMap = new HashMap();
|
|
||||||
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 0), 16);
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 9), 6);
|
|
||||||
flowerMap.put(new WorldGenBOPDoubleFlora(5, 3), 4);
|
|
||||||
|
|
||||||
return flowerMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 1D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
||||||
{
|
{
|
||||||
|
@ -98,14 +80,12 @@ public class BiomeGenGrove extends BOPBiome
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeGrassColor()
|
|
||||||
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
||||||
{
|
{
|
||||||
return 5341009;
|
return 5341009;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeFoliageColor()
|
|
||||||
public int getBiomeFoliageColor(int x, int y, int z)
|
public int getBiomeFoliageColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 6396257;
|
return 6396257;
|
||||||
|
|
|
@ -1,20 +1,18 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import java.util.Random;
|
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
||||||
|
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
||||||
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
|
import biomesoplenty.common.world.features.trees.WorldGenBOPShrub;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.entity.passive.EntityHorse;
|
import net.minecraft.entity.passive.EntityHorse;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
import net.minecraft.world.gen.feature.WorldGenShrub;
|
import net.minecraft.world.gen.feature.WorldGenShrub;
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import java.util.Random;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBOPShrub;
|
|
||||||
|
|
||||||
public class BiomeGenHeathland extends BOPBiome
|
public class BiomeGenHeathland extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -24,9 +22,7 @@ public class BiomeGenHeathland extends BOPBiome
|
||||||
{
|
{
|
||||||
super(id);
|
super(id);
|
||||||
|
|
||||||
//TODO: setHeight()
|
|
||||||
this.setHeight(biomeHeight);
|
this.setHeight(biomeHeight);
|
||||||
//TODO: setColor()
|
|
||||||
this.setColor(13550967);
|
this.setColor(13550967);
|
||||||
this.setTemperatureRainfall(0.8F, 0.1F);
|
this.setTemperatureRainfall(0.8F, 0.1F);
|
||||||
|
|
||||||
|
@ -38,44 +34,27 @@ public class BiomeGenHeathland extends BOPBiome
|
||||||
this.theBiomeDecorator.grassPerChunk = 10;
|
this.theBiomeDecorator.grassPerChunk = 10;
|
||||||
this.theBiomeDecorator.deadBushPerChunk = 2;
|
this.theBiomeDecorator.deadBushPerChunk = 2;
|
||||||
|
|
||||||
this.bopWorldFeatures.bopFlowersPerChunk = 20;
|
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 20);
|
||||||
this.bopWorldFeatures.berryBushesPerChunk = 1;
|
this.bopWorldFeatures.setFeature("berryBushesPerChunk", 1);
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 5;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 5);
|
||||||
this.bopWorldFeatures.leafPilesPerChunk = 10;
|
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 10);
|
||||||
this.bopWorldFeatures.generatePumpkins = false;
|
this.bopWorldFeatures.setFeature("generatePumpkins", false);
|
||||||
|
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 7), 8);
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 2), 6);
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(1, 5), 4);
|
||||||
|
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getRandomWorldGenForTrees()
|
|
||||||
public WorldGenAbstractTree func_150567_a(Random random)
|
public WorldGenAbstractTree func_150567_a(Random random)
|
||||||
{
|
{
|
||||||
return random.nextInt(3) == 0 ? new WorldGenBOPShrub(BOPBlockHelper.get("logs4"), BOPBlockHelper.get("leaves4"), 2, 1, Blocks.grass) : (random.nextInt(2) == 0 ? new WorldGenShrub(0, 0) : worldGeneratorTrees);
|
return random.nextInt(3) == 0 ? new WorldGenBOPShrub(BOPBlockHelper.get("logs4"), BOPBlockHelper.get("leaves4"), 2, 1, Blocks.grass) : (random.nextInt(2) == 0 ? new WorldGenShrub(0, 0) : worldGeneratorTrees);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenBOPFlora, Integer> getWeightedWorldGenForBOPFlowers()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenBOPFlora, Integer> flowerMap = new HashMap();
|
|
||||||
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 7), 8);
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(Blocks.red_flower, 2), 6);
|
|
||||||
flowerMap.put(new WorldGenBOPDoubleFlora(1, 5), 4);
|
|
||||||
|
|
||||||
return flowerMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
||||||
{
|
{
|
||||||
|
@ -88,26 +67,22 @@ public class BiomeGenHeathland extends BOPBiome
|
||||||
int y = random.nextInt(28) + 4;
|
int y = random.nextInt(28) + 4;
|
||||||
int z = chunkZ + random.nextInt(16);
|
int z = chunkZ + random.nextInt(16);
|
||||||
|
|
||||||
//TODO: getBlock()
|
|
||||||
Block block = world.getBlock(x, y, z);
|
Block block = world.getBlock(x, y, z);
|
||||||
|
|
||||||
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
||||||
{
|
{
|
||||||
//TODO: setBlock()
|
|
||||||
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 4, 2);
|
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 4, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeGrassColor()
|
|
||||||
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
||||||
{
|
{
|
||||||
return 13550967;
|
return 13550967;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeFoliageColor()
|
|
||||||
public int getBiomeFoliageColor(int x, int y, int z)
|
public int getBiomeFoliageColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 11454081;
|
return 11454081;
|
||||||
|
|
|
@ -1,15 +1,13 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenHighland extends BOPBiome
|
public class BiomeGenHighland extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -19,29 +17,19 @@ public class BiomeGenHighland extends BOPBiome
|
||||||
{
|
{
|
||||||
super(id);
|
super(id);
|
||||||
|
|
||||||
//TODO: setHeight()
|
|
||||||
this.setHeight(biomeHeight);
|
this.setHeight(biomeHeight);
|
||||||
//TODO: setColor()
|
|
||||||
this.setColor(8170854);
|
this.setColor(8170854);
|
||||||
this.setTemperatureRainfall(0.5F, 0.5F);
|
this.setTemperatureRainfall(0.5F, 0.5F);
|
||||||
|
|
||||||
this.theBiomeDecorator.treesPerChunk = -999;
|
this.theBiomeDecorator.treesPerChunk = -999;
|
||||||
this.theBiomeDecorator.grassPerChunk = 99;
|
this.theBiomeDecorator.grassPerChunk = 99;
|
||||||
|
|
||||||
this.bopWorldFeatures.wildCarrotsPerChunk = 1;
|
this.bopWorldFeatures.setFeature("wildCarrotsPerChunk", 1);
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.25D);
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.25D);
|
||||||
{
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
weightedGrassGen.put(new WorldGenBOPDoubleFlora(2), 1D);
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.25D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.25D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPDoubleFlora(2), 1D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import java.util.Random;
|
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
||||||
|
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
||||||
|
import biomesoplenty.common.world.features.trees.WorldGenPineTree;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
@ -10,11 +11,8 @@ import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
import net.minecraft.world.gen.feature.WorldGenShrub;
|
import net.minecraft.world.gen.feature.WorldGenShrub;
|
||||||
import net.minecraft.world.gen.feature.WorldGenTallGrass;
|
import net.minecraft.world.gen.feature.WorldGenTallGrass;
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
|
||||||
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
import java.util.Random;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenPineTree;
|
|
||||||
|
|
||||||
public class BiomeGenJadeCliffs extends BOPBiome
|
public class BiomeGenJadeCliffs extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -24,17 +22,17 @@ public class BiomeGenJadeCliffs extends BOPBiome
|
||||||
{
|
{
|
||||||
super(id);
|
super(id);
|
||||||
|
|
||||||
//TODO: setHeight()
|
|
||||||
this.setHeight(biomeHeight);
|
this.setHeight(biomeHeight);
|
||||||
//TODO: setColor()
|
|
||||||
this.setColor(9096298);
|
this.setColor(9096298);
|
||||||
this.setTemperatureRainfall(0.5F, 0.1F);
|
this.setTemperatureRainfall(0.5F, 0.1F);
|
||||||
|
|
||||||
this.theBiomeDecorator.treesPerChunk = 12;
|
this.theBiomeDecorator.treesPerChunk = 12;
|
||||||
this.theBiomeDecorator.grassPerChunk = 3;
|
this.theBiomeDecorator.grassPerChunk = 3;
|
||||||
|
|
||||||
this.bopWorldFeatures.bopFlowersPerChunk = 3;
|
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 3);
|
||||||
this.bopWorldFeatures.wildCarrotsPerChunk = 1;
|
this.bopWorldFeatures.setFeature("wildCarrotsPerChunk", 1);
|
||||||
|
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(1, 5), 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -44,16 +42,6 @@ public class BiomeGenJadeCliffs extends BOPBiome
|
||||||
return random.nextInt(4) == 0 ? new WorldGenShrub(0, 1) : new WorldGenPineTree();
|
return random.nextInt(4) == 0 ? new WorldGenShrub(0, 1) : new WorldGenPineTree();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenBOPFlora, Integer> getWeightedWorldGenForBOPFlowers()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenBOPFlora, Integer> flowerMap = new HashMap();
|
|
||||||
|
|
||||||
flowerMap.put(new WorldGenBOPDoubleFlora(1, 5), 6);
|
|
||||||
|
|
||||||
return flowerMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public WorldGenerator getRandomWorldGenForGrass(Random random)
|
public WorldGenerator getRandomWorldGenForGrass(Random random)
|
||||||
{
|
{
|
||||||
|
@ -72,12 +60,10 @@ public class BiomeGenJadeCliffs extends BOPBiome
|
||||||
int y = random.nextInt(28) + 4;
|
int y = random.nextInt(28) + 4;
|
||||||
int z = chunkZ + random.nextInt(16);
|
int z = chunkZ + random.nextInt(16);
|
||||||
|
|
||||||
//TODO: getBlock()
|
|
||||||
Block block = world.getBlock(x, y, z);
|
Block block = world.getBlock(x, y, z);
|
||||||
|
|
||||||
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
||||||
{
|
{
|
||||||
//TODO: setBlock()
|
|
||||||
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 0, 2);
|
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 0, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -91,14 +77,12 @@ public class BiomeGenJadeCliffs extends BOPBiome
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeGrassColor()
|
|
||||||
public int getBiomeGrassColor(int x, int y, int z)
|
public int getBiomeGrassColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 8168808;
|
return 8168808;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeFoliageColor()
|
|
||||||
public int getBiomeFoliageColor(int x, int y, int z)
|
public int getBiomeFoliageColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 9096298;
|
return 9096298;
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.Random;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
|
import biomesoplenty.common.world.features.trees.WorldGenOriginalTree;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
import net.minecraft.world.gen.feature.WorldGenTallGrass;
|
import net.minecraft.world.gen.feature.WorldGenTallGrass;
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenOriginalTree;
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenLavenderFields extends BOPBiome
|
public class BiomeGenLavenderFields extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -19,9 +19,7 @@ public class BiomeGenLavenderFields extends BOPBiome
|
||||||
{
|
{
|
||||||
super(id);
|
super(id);
|
||||||
|
|
||||||
//TODO: setHeight()
|
|
||||||
this.setHeight(biomeHeight);
|
this.setHeight(biomeHeight);
|
||||||
//TODO: setColor()
|
|
||||||
this.setColor(11035852);
|
this.setColor(11035852);
|
||||||
this.setTemperatureRainfall(0.6F, 0.7F);
|
this.setTemperatureRainfall(0.6F, 0.7F);
|
||||||
|
|
||||||
|
@ -29,7 +27,7 @@ public class BiomeGenLavenderFields extends BOPBiome
|
||||||
this.theBiomeDecorator.flowersPerChunk = -999;
|
this.theBiomeDecorator.flowersPerChunk = -999;
|
||||||
this.theBiomeDecorator.grassPerChunk = 20;
|
this.theBiomeDecorator.grassPerChunk = 20;
|
||||||
|
|
||||||
this.bopWorldFeatures.lavenderPerChunk = 999;
|
this.bopWorldFeatures.setFeature("lavenderPerChunk", 999);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -46,14 +44,12 @@ public class BiomeGenLavenderFields extends BOPBiome
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeGrassColor()
|
|
||||||
public int getBiomeGrassColor(int x, int y, int z)
|
public int getBiomeGrassColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 10601325;
|
return 10601325;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeFoliageColor()
|
|
||||||
public int getBiomeFoliageColor(int x, int y, int z)
|
public int getBiomeFoliageColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 10601325;
|
return 10601325;
|
||||||
|
@ -71,12 +67,10 @@ public class BiomeGenLavenderFields extends BOPBiome
|
||||||
int y = random.nextInt(28) + 4;
|
int y = random.nextInt(28) + 4;
|
||||||
int z = chunkZ + random.nextInt(16);
|
int z = chunkZ + random.nextInt(16);
|
||||||
|
|
||||||
//TODO: getBlock()
|
|
||||||
Block block = world.getBlock(x, y, z);
|
Block block = world.getBlock(x, y, z);
|
||||||
|
|
||||||
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
||||||
{
|
{
|
||||||
//TODO: setBlock()
|
|
||||||
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 4, 2);
|
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 4, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,21 +1,19 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.entity.passive.EntityHorse;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenShrub;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenCypress;
|
import biomesoplenty.common.world.features.trees.WorldGenCypress;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenDeadTree1;
|
import biomesoplenty.common.world.features.trees.WorldGenDeadTree1;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.entity.passive.EntityHorse;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenShrub;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenLushDesert extends BOPBiome
|
public class BiomeGenLushDesert extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -41,15 +39,23 @@ public class BiomeGenLushDesert extends BOPBiome
|
||||||
this.theBiomeDecorator.cactiPerChunk = 20;
|
this.theBiomeDecorator.cactiPerChunk = 20;
|
||||||
this.theBiomeDecorator.deadBushPerChunk = 2;
|
this.theBiomeDecorator.deadBushPerChunk = 2;
|
||||||
|
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 10;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 10);
|
||||||
this.bopWorldFeatures.oasesPerChunk = 999;
|
this.bopWorldFeatures.setFeature("oasesPerChunk", 999);
|
||||||
this.bopWorldFeatures.bopFlowersPerChunk = 5;
|
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 5);
|
||||||
this.bopWorldFeatures.tinyCactiPerChunk = 5;
|
this.bopWorldFeatures.setFeature("tinyCactiPerChunk", 5);
|
||||||
this.bopWorldFeatures.waterLakesPerChunk = 5;
|
this.bopWorldFeatures.setFeature("waterLakesPerChunk", 5);
|
||||||
this.bopWorldFeatures.waterReedsPerChunk = 4;
|
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 4);
|
||||||
this.bopWorldFeatures.bromeliadsPerChunk = 3;
|
this.bopWorldFeatures.setFeature("bromeliadsPerChunk", 3);
|
||||||
this.bopWorldFeatures.generateSand = true;
|
this.bopWorldFeatures.setFeature("generateSand", true);
|
||||||
this.bopWorldFeatures.generatePumpkins = false;
|
this.bopWorldFeatures.setFeature("generatePumpkins", false);
|
||||||
|
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(4, 5), 4);
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 7), 8);
|
||||||
|
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("plants"), 1), 1D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -61,30 +67,6 @@ public class BiomeGenLushDesert extends BOPBiome
|
||||||
(random.nextInt(2) == 0 ? worldGeneratorTrees : new WorldGenShrub(0,0)));
|
(random.nextInt(2) == 0 ? worldGeneratorTrees : new WorldGenShrub(0,0)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenBOPFlora, Integer> getWeightedWorldGenForBOPFlowers()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenBOPFlora, Integer> flowerMap = new HashMap();
|
|
||||||
|
|
||||||
flowerMap.put(new WorldGenBOPDoubleFlora(4, 5), 4);
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 7), 8);
|
|
||||||
|
|
||||||
return flowerMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("plants"), 1), 1D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,18 +1,16 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import java.util.Random;
|
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
||||||
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
|
import biomesoplenty.common.world.features.trees.WorldGenBOPSwampTree;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.entity.monster.EntitySlime;
|
import net.minecraft.entity.monster.EntitySlime;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import java.util.Random;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBOPSwampTree;
|
|
||||||
|
|
||||||
public class BiomeGenLushSwamp extends BOPBiome
|
public class BiomeGenLushSwamp extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -22,9 +20,7 @@ public class BiomeGenLushSwamp extends BOPBiome
|
||||||
{
|
{
|
||||||
super(id);
|
super(id);
|
||||||
|
|
||||||
//TODO: setHeight()
|
|
||||||
this.setHeight(biomeHeight);
|
this.setHeight(biomeHeight);
|
||||||
//TODO: setColor()
|
|
||||||
this.setColor(5746228);
|
this.setColor(5746228);
|
||||||
this.setTemperatureRainfall(0.7F, 1.0F);
|
this.setTemperatureRainfall(0.7F, 1.0F);
|
||||||
|
|
||||||
|
@ -35,17 +31,25 @@ public class BiomeGenLushSwamp extends BOPBiome
|
||||||
this.theBiomeDecorator.mushroomsPerChunk = 8;
|
this.theBiomeDecorator.mushroomsPerChunk = 8;
|
||||||
this.theBiomeDecorator.reedsPerChunk = 16;
|
this.theBiomeDecorator.reedsPerChunk = 16;
|
||||||
|
|
||||||
this.bopWorldFeatures.bopFlowersPerChunk = 1;
|
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 1);
|
||||||
this.bopWorldFeatures.cattailsPerChunk = 10;
|
this.bopWorldFeatures.setFeature("cattailsPerChunk", 10);
|
||||||
this.bopWorldFeatures.highCattailsPerChunk = 5;
|
this.bopWorldFeatures.setFeature("highCattailsPerChunk", 5);
|
||||||
this.bopWorldFeatures.riverCanePerChunk = 5;
|
this.bopWorldFeatures.setFeature("riverCanePerChunk", 5);
|
||||||
//TODO: FEATURE this.bopWorldFeatures.poisonWaterPerChunk = 2;
|
//TODO: FEATURE this.bopWorldFeatures.poisonWaterPerChunk = 2;
|
||||||
this.bopWorldFeatures.wildCarrotsPerChunk = 1;
|
this.bopWorldFeatures.setFeature("wildCarrotsPerChunk", 1);
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 5;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 5);
|
||||||
this.bopWorldFeatures.koruPerChunk = 1;
|
this.bopWorldFeatures.setFeature("koruPerChunk", 1);
|
||||||
this.bopWorldFeatures.waterReedsPerChunk = 6;
|
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 6);
|
||||||
this.bopWorldFeatures.cloverPatchesPerChunk = 10;
|
this.bopWorldFeatures.setFeature("cloverPatchesPerChunk", 10);
|
||||||
this.bopWorldFeatures.seaweedPerChunk = 10;
|
this.bopWorldFeatures.setFeature("seaweedPerChunk", 10);
|
||||||
|
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 4), 8);
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 2), 4);
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 1), 6);
|
||||||
|
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -55,30 +59,6 @@ public class BiomeGenLushSwamp extends BOPBiome
|
||||||
return new WorldGenBOPSwampTree(Blocks.log, Blocks.leaves, 0, 0, 8, 6, BOPBlockHelper.get("ivy"), -1);
|
return new WorldGenBOPSwampTree(Blocks.log, Blocks.leaves, 0, 0, 8, 6, BOPBlockHelper.get("ivy"), -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenBOPFlora, Integer> getWeightedWorldGenForBOPFlowers()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenBOPFlora, Integer> flowerMap = new HashMap();
|
|
||||||
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 4), 8);
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(Blocks.red_flower, 2), 4);
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(Blocks.red_flower, 1), 6);
|
|
||||||
|
|
||||||
return flowerMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
||||||
{
|
{
|
||||||
|
@ -91,7 +71,6 @@ public class BiomeGenLushSwamp extends BOPBiome
|
||||||
int y = random.nextInt(28) + 4;
|
int y = random.nextInt(28) + 4;
|
||||||
int z = chunkZ + random.nextInt(16);
|
int z = chunkZ + random.nextInt(16);
|
||||||
|
|
||||||
//TODO: getBlock()
|
|
||||||
Block block = world.getBlock(x, y, z);
|
Block block = world.getBlock(x, y, z);
|
||||||
|
|
||||||
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
||||||
|
|
|
@ -1,18 +1,16 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBOPTaiga2;
|
import biomesoplenty.common.world.features.trees.WorldGenBOPTaiga2;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenOriginalTree;
|
import biomesoplenty.common.world.features.trees.WorldGenOriginalTree;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenMapleWoods extends BOPBiome
|
public class BiomeGenMapleWoods extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -22,19 +20,23 @@ public class BiomeGenMapleWoods extends BOPBiome
|
||||||
{
|
{
|
||||||
super(id);
|
super(id);
|
||||||
|
|
||||||
//TODO: setHeight()
|
|
||||||
this.setHeight(biomeHeight);
|
this.setHeight(biomeHeight);
|
||||||
//TODO: setColor()
|
|
||||||
this.setColor(6988649);
|
this.setColor(6988649);
|
||||||
this.setTemperatureRainfall(0.2F, 0.8F);
|
this.setTemperatureRainfall(0.2F, 0.8F);
|
||||||
|
|
||||||
this.theBiomeDecorator.treesPerChunk = 9;
|
this.theBiomeDecorator.treesPerChunk = 9;
|
||||||
this.theBiomeDecorator.grassPerChunk = 1;
|
this.theBiomeDecorator.grassPerChunk = 1;
|
||||||
|
|
||||||
this.bopWorldFeatures.bopFlowersPerChunk = 2;
|
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 2);
|
||||||
this.bopWorldFeatures.poisonIvyPerChunk = 1;
|
this.bopWorldFeatures.setFeature("poisonIvyPerChunk", 1);
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 2;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 2);
|
||||||
this.bopWorldFeatures.deadLeafPilesPerChunk = 8;
|
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 8);
|
||||||
|
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 8), 1);
|
||||||
|
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -45,28 +47,6 @@ public class BiomeGenMapleWoods extends BOPBiome
|
||||||
new WorldGenOriginalTree(Blocks.log, BOPBlockHelper.get("leaves3"), 0, 2, false, 5, 3, false);
|
new WorldGenOriginalTree(Blocks.log, BOPBlockHelper.get("leaves3"), 0, 2, false, 5, 3, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenBOPFlora, Integer> getWeightedWorldGenForBOPFlowers()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenBOPFlora, Integer> flowerMap = new HashMap();
|
|
||||||
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 8), 1);
|
|
||||||
|
|
||||||
return flowerMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
||||||
{
|
{
|
||||||
|
@ -79,12 +59,10 @@ public class BiomeGenMapleWoods extends BOPBiome
|
||||||
int y = random.nextInt(28) + 4;
|
int y = random.nextInt(28) + 4;
|
||||||
int z = chunkZ + random.nextInt(16);
|
int z = chunkZ + random.nextInt(16);
|
||||||
|
|
||||||
//TODO: getBlock()
|
|
||||||
Block block = world.getBlock(x, y, z);
|
Block block = world.getBlock(x, y, z);
|
||||||
|
|
||||||
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
||||||
{
|
{
|
||||||
//TODO: setBlock()
|
|
||||||
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 0, 2);
|
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 0, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,14 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import java.util.Random;
|
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
||||||
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.entity.monster.EntitySlime;
|
import net.minecraft.entity.monster.EntitySlime;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import java.util.Random;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
|
||||||
|
|
||||||
public class BiomeGenMarsh extends BOPBiome
|
public class BiomeGenMarsh extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -20,9 +18,7 @@ public class BiomeGenMarsh extends BOPBiome
|
||||||
{
|
{
|
||||||
super(id);
|
super(id);
|
||||||
|
|
||||||
//TODO: setHeight()
|
|
||||||
this.setHeight(biomeHeight);
|
this.setHeight(biomeHeight);
|
||||||
//TODO: setColor()
|
|
||||||
this.setColor(6725742);
|
this.setColor(6725742);
|
||||||
this.setTemperatureRainfall(0.5F, 0.9F);
|
this.setTemperatureRainfall(0.5F, 0.9F);
|
||||||
|
|
||||||
|
@ -39,25 +35,17 @@ public class BiomeGenMarsh extends BOPBiome
|
||||||
this.theBiomeDecorator.sandPerChunk = -999;
|
this.theBiomeDecorator.sandPerChunk = -999;
|
||||||
this.theBiomeDecorator.sandPerChunk2 = -999;
|
this.theBiomeDecorator.sandPerChunk2 = -999;
|
||||||
|
|
||||||
this.bopWorldFeatures.koruPerChunk = 1;
|
this.bopWorldFeatures.setFeature("koruPerChunk", 1);
|
||||||
this.bopWorldFeatures.mudPerChunk = 1;
|
this.bopWorldFeatures.setFeature("mudPerChunk", 1);
|
||||||
this.bopWorldFeatures.waterLakesPerChunk = 100;
|
this.bopWorldFeatures.setFeature("waterLakesPerChunk", 100);
|
||||||
this.bopWorldFeatures.waterReedsPerChunk = 10;
|
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 10);
|
||||||
this.bopWorldFeatures.seaweedPerChunk = 15;
|
this.bopWorldFeatures.setFeature("seaweedPerChunk", 15);
|
||||||
this.bopWorldFeatures.generatePumpkins = false;
|
this.bopWorldFeatures.setFeature("generatePumpkins", false);
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
{
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
weightedGrassGen.put(new WorldGenBOPDoubleFlora(2), 0.25D);
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
|
||||||
grassMap.put(new WorldGenBOPDoubleFlora(2), 0.25D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -72,12 +60,10 @@ public class BiomeGenMarsh extends BOPBiome
|
||||||
int y = random.nextInt(28) + 4;
|
int y = random.nextInt(28) + 4;
|
||||||
int z = chunkZ + random.nextInt(16);
|
int z = chunkZ + random.nextInt(16);
|
||||||
|
|
||||||
//TODO: getBlock()
|
|
||||||
Block block = world.getBlock(x, y, z);
|
Block block = world.getBlock(x, y, z);
|
||||||
|
|
||||||
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
||||||
{
|
{
|
||||||
//TODO: setBlock()
|
|
||||||
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 12, 2);
|
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 12, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +1,18 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.entity.passive.EntityHorse;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBOPShrub;
|
import biomesoplenty.common.world.features.trees.WorldGenBOPShrub;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBOPTaiga2;
|
import biomesoplenty.common.world.features.trees.WorldGenBOPTaiga2;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.entity.passive.EntityHorse;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenMeadow extends BOPBiome
|
public class BiomeGenMeadow extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -35,12 +33,22 @@ public class BiomeGenMeadow extends BOPBiome
|
||||||
this.theBiomeDecorator.mushroomsPerChunk = 2;
|
this.theBiomeDecorator.mushroomsPerChunk = 2;
|
||||||
this.theBiomeDecorator.flowersPerChunk = 10;
|
this.theBiomeDecorator.flowersPerChunk = 10;
|
||||||
|
|
||||||
this.bopWorldFeatures.bopFlowersPerChunk = 14;
|
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 14);
|
||||||
this.bopWorldFeatures.wildCarrotsPerChunk = 1;
|
this.bopWorldFeatures.setFeature("wildCarrotsPerChunk", 1);
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 5;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 5);
|
||||||
this.bopWorldFeatures.cloverPatchesPerChunk = 15;
|
this.bopWorldFeatures.setFeature("cloverPatchesPerChunk", 15);
|
||||||
this.bopWorldFeatures.seaweedPerChunk = 5;
|
this.bopWorldFeatures.setFeature("seaweedPerChunk", 5);
|
||||||
this.bopWorldFeatures.generatePumpkins = false;
|
this.bopWorldFeatures.setFeature("generatePumpkins", false);
|
||||||
|
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 0), 10);
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 4), 8);
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(5, 3), 5);
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(1, 5), 4);
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(0, 3), 2);
|
||||||
|
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -50,32 +58,6 @@ public class BiomeGenMeadow extends BOPBiome
|
||||||
return random.nextInt(5) == 0 ? new WorldGenBOPTaiga2(Blocks.log, Blocks.leaves, 1, 1, false, 6, 4, 0) : new WorldGenBOPShrub(Blocks.log, Blocks.leaves, 0, 1, Blocks.dirt, Blocks.grass);
|
return random.nextInt(5) == 0 ? new WorldGenBOPTaiga2(Blocks.log, Blocks.leaves, 1, 1, false, 6, 4, 0) : new WorldGenBOPShrub(Blocks.log, Blocks.leaves, 0, 1, Blocks.dirt, Blocks.grass);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenBOPFlora, Integer> getWeightedWorldGenForBOPFlowers()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenBOPFlora, Integer> flowerMap = new HashMap();
|
|
||||||
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 0), 10);
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 4), 8);
|
|
||||||
flowerMap.put(new WorldGenBOPDoubleFlora(5, 3), 5);
|
|
||||||
flowerMap.put(new WorldGenBOPDoubleFlora(1, 5), 4);
|
|
||||||
flowerMap.put(new WorldGenBOPDoubleFlora(0, 3), 2);
|
|
||||||
|
|
||||||
return flowerMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
||||||
{
|
{
|
||||||
|
@ -88,12 +70,10 @@ public class BiomeGenMeadow extends BOPBiome
|
||||||
int y = random.nextInt(28) + 4;
|
int y = random.nextInt(28) + 4;
|
||||||
int z = chunkZ + random.nextInt(16);
|
int z = chunkZ + random.nextInt(16);
|
||||||
|
|
||||||
//TODO: getBlock()
|
|
||||||
Block block = world.getBlock(x, y, z);
|
Block block = world.getBlock(x, y, z);
|
||||||
|
|
||||||
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
||||||
{
|
{
|
||||||
//TODO: setBlock()
|
|
||||||
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 4, 2);
|
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 4, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,14 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenMoor extends BOPBiome
|
public class BiomeGenMoor extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -38,36 +36,20 @@ public class BiomeGenMoor extends BOPBiome
|
||||||
this.theBiomeDecorator.sandPerChunk = -999;
|
this.theBiomeDecorator.sandPerChunk = -999;
|
||||||
this.theBiomeDecorator.sandPerChunk2 = -999;
|
this.theBiomeDecorator.sandPerChunk2 = -999;
|
||||||
|
|
||||||
this.bopWorldFeatures.mudPerChunk = 1;
|
this.bopWorldFeatures.setFeature("mudPerChunk", 1);
|
||||||
this.bopWorldFeatures.waterLakesPerChunk = 10;
|
this.bopWorldFeatures.setFeature("waterLakesPerChunk", 10);
|
||||||
this.bopWorldFeatures.bopFlowersPerChunk = 6;
|
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 6);
|
||||||
this.bopWorldFeatures.koruPerChunk = 6;
|
this.bopWorldFeatures.setFeature("koruPerChunk", 6);
|
||||||
this.bopWorldFeatures.seaweedPerChunk = 5;
|
this.bopWorldFeatures.setFeature("seaweedPerChunk", 5);
|
||||||
this.bopWorldFeatures.generatePumpkins = false;
|
this.bopWorldFeatures.setFeature("generatePumpkins", false);
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 1), 14);
|
||||||
public HashMap<WorldGenBOPFlora, Integer> getWeightedWorldGenForBOPFlowers()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenBOPFlora, Integer> flowerMap = new HashMap();
|
|
||||||
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 1), 14);
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 1D);
|
||||||
return flowerMap;
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
|
||||||
}
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 1D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.Random;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
|
import biomesoplenty.common.world.features.trees.WorldGenPineTree;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
import net.minecraft.world.gen.feature.WorldGenTallGrass;
|
import net.minecraft.world.gen.feature.WorldGenTallGrass;
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenPineTree;
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenMountain extends BOPBiome
|
public class BiomeGenMountain extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -19,20 +19,18 @@ public class BiomeGenMountain extends BOPBiome
|
||||||
{
|
{
|
||||||
super(id);
|
super(id);
|
||||||
|
|
||||||
//TODO: setHeight()
|
|
||||||
this.setHeight(biomeHeight);
|
this.setHeight(biomeHeight);
|
||||||
//TODO: setColor()
|
|
||||||
this.setColor(8430421);
|
this.setColor(8430421);
|
||||||
this.setTemperatureRainfall(0.5F, 0.1F);
|
this.setTemperatureRainfall(0.5F, 0.1F);
|
||||||
|
|
||||||
this.theBiomeDecorator.treesPerChunk = 2;
|
this.theBiomeDecorator.treesPerChunk = 2;
|
||||||
this.theBiomeDecorator.grassPerChunk = 3;
|
this.theBiomeDecorator.grassPerChunk = 3;
|
||||||
|
|
||||||
this.bopWorldFeatures.berryBushesPerChunk = 3;
|
this.bopWorldFeatures.setFeature("berryBushesPerChunk", 3);
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 10;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 10);
|
||||||
this.bopWorldFeatures.waterReedsPerChunk = 4;
|
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 4);
|
||||||
this.bopWorldFeatures.leafPilesPerChunk = 10;
|
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 10);
|
||||||
this.bopWorldFeatures.deadLeafPilesPerChunk = 10;
|
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -60,12 +58,10 @@ public class BiomeGenMountain extends BOPBiome
|
||||||
int y = random.nextInt(28) + 4;
|
int y = random.nextInt(28) + 4;
|
||||||
int z = chunkZ + random.nextInt(16);
|
int z = chunkZ + random.nextInt(16);
|
||||||
|
|
||||||
//TODO: getBlock()
|
|
||||||
Block block = world.getBlock(x, y, z);
|
Block block = world.getBlock(x, y, z);
|
||||||
|
|
||||||
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
||||||
{
|
{
|
||||||
//TODO: setBlock()
|
|
||||||
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 0, 2);
|
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 0, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,16 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.entity.monster.EntityWitch;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBOPSwampTree;
|
import biomesoplenty.common.world.features.trees.WorldGenBOPSwampTree;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenOriginalTree;
|
import biomesoplenty.common.world.features.trees.WorldGenOriginalTree;
|
||||||
|
import net.minecraft.entity.monster.EntityWitch;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenMysticGrove extends BOPBiome
|
public class BiomeGenMysticGrove extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -42,14 +40,26 @@ public class BiomeGenMysticGrove extends BOPBiome
|
||||||
this.theBiomeDecorator.sandPerChunk2 = -999;
|
this.theBiomeDecorator.sandPerChunk2 = -999;
|
||||||
this.theBiomeDecorator.flowersPerChunk = 8;
|
this.theBiomeDecorator.flowersPerChunk = 8;
|
||||||
|
|
||||||
this.bopWorldFeatures.bopFlowersPerChunk = 10;
|
this.bopWorldFeatures.setFeature("generatePumpkins", 10);
|
||||||
this.bopWorldFeatures.sproutsPerChunk = 1;
|
this.bopWorldFeatures.setFeature("generatePumpkins", 1);
|
||||||
this.bopWorldFeatures.blueMilksPerChunk = 1;
|
this.bopWorldFeatures.setFeature("generatePumpkins", 1);
|
||||||
//TODO: FEATURE customBiomeDecorator.poisonWaterPerChunk = 1;
|
//TODO: FEATURE customBiomeDecorator.poisonWaterPerChunk = 1;
|
||||||
|
|
||||||
this.bopWorldFeatures.cloverPatchesPerChunk = 10;
|
this.bopWorldFeatures.setFeature("cloverPatchesPerChunk", 10);
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 4;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 4);
|
||||||
|
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 6), 12);
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 3), 10);
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 4), 8);
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 3), 6);
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 2), 6);
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(1, 5), 4);
|
||||||
|
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 1D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -63,43 +73,12 @@ public class BiomeGenMysticGrove extends BOPBiome
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HashMap<WorldGenBOPFlora, Integer> getWeightedWorldGenForBOPFlowers()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenBOPFlora, Integer> flowerMap = new HashMap();
|
|
||||||
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 6), 12);
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 3), 10);
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 4), 8);
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(Blocks.red_flower, 3), 6);
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(Blocks.red_flower, 2), 6);
|
|
||||||
flowerMap.put(new WorldGenBOPDoubleFlora(1, 5), 4);
|
|
||||||
|
|
||||||
return flowerMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 1D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
//TODO: getBiomeGrassColor()
|
|
||||||
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
||||||
{
|
{
|
||||||
return 6934491;
|
return 6934491;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeFoliageColor()
|
|
||||||
public int getBiomeFoliageColor(int x, int y, int z)
|
public int getBiomeFoliageColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 7397529;
|
return 7397529;
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.Random;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
|
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
||||||
|
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
||||||
|
import biomesoplenty.common.world.features.trees.WorldGenBOPSwampTree;
|
||||||
|
import biomesoplenty.common.world.features.trees.WorldGenBOPTaiga2;
|
||||||
|
import biomesoplenty.common.world.features.trees.WorldGenDeadTree1;
|
||||||
import net.minecraft.entity.monster.EntityCaveSpider;
|
import net.minecraft.entity.monster.EntityCaveSpider;
|
||||||
import net.minecraft.entity.monster.EntityEnderman;
|
import net.minecraft.entity.monster.EntityEnderman;
|
||||||
import net.minecraft.entity.passive.EntityBat;
|
import net.minecraft.entity.passive.EntityBat;
|
||||||
|
@ -9,12 +13,8 @@ import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
import net.minecraft.world.gen.feature.WorldGenTallGrass;
|
import net.minecraft.world.gen.feature.WorldGenTallGrass;
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
|
||||||
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
import java.util.Random;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBOPSwampTree;
|
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBOPTaiga2;
|
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenDeadTree1;
|
|
||||||
|
|
||||||
public class BiomeGenOminousWoods extends BOPBiome
|
public class BiomeGenOminousWoods extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -48,9 +48,9 @@ public class BiomeGenOminousWoods extends BOPBiome
|
||||||
this.theBiomeDecorator.sandPerChunk = -999;
|
this.theBiomeDecorator.sandPerChunk = -999;
|
||||||
this.theBiomeDecorator.sandPerChunk2 = -999;
|
this.theBiomeDecorator.sandPerChunk2 = -999;
|
||||||
|
|
||||||
this.bopWorldFeatures.bopFlowersPerChunk = 1;
|
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 1);
|
||||||
this.bopWorldFeatures.thornsPerChunk = 9;
|
this.bopWorldFeatures.setFeature("thornsPerChunk", 9);
|
||||||
this.bopWorldFeatures.poisonIvyPerChunk = 3;
|
this.bopWorldFeatures.setFeature("poisonIvyPerChunk", 3);
|
||||||
//TODO: FEATURE customBiomeDecorator.poisonWaterPerChunk = 15;
|
//TODO: FEATURE customBiomeDecorator.poisonWaterPerChunk = 15;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,14 +74,12 @@ public class BiomeGenOminousWoods extends BOPBiome
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeGrassColor()
|
|
||||||
public int getBiomeGrassColor(int x, int y, int z)
|
public int getBiomeGrassColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 4145489;
|
return 4145489;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeFoliageColor()
|
|
||||||
public int getBiomeFoliageColor(int x, int y, int z)
|
public int getBiomeFoliageColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 4145489;
|
return 4145489;
|
||||||
|
|
|
@ -1,15 +1,13 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenOriginalTree;
|
import biomesoplenty.common.world.features.trees.WorldGenOriginalTree;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenOriginValley extends BOPBiome
|
public class BiomeGenOriginValley extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -33,13 +31,16 @@ public class BiomeGenOriginValley extends BOPBiome
|
||||||
this.theBiomeDecorator.clayPerChunk = 0;
|
this.theBiomeDecorator.clayPerChunk = 0;
|
||||||
this.theBiomeDecorator.flowersPerChunk = -999;
|
this.theBiomeDecorator.flowersPerChunk = -999;
|
||||||
|
|
||||||
this.bopWorldFeatures.bopFlowersPerChunk = 4;
|
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 4);
|
||||||
this.bopWorldFeatures.rootsPerChunk = -999;
|
this.bopWorldFeatures.setFeature("rootsPerChunk", -999);
|
||||||
this.bopWorldFeatures.stalagmitesPerChunk = -999;
|
this.bopWorldFeatures.setFeature("stalagmitesPerChunk", -999);
|
||||||
this.bopWorldFeatures.stalactitesPerChunk = -999;
|
this.bopWorldFeatures.setFeature("stalactitesPerChunk", -999);
|
||||||
this.bopWorldFeatures.minersDelightPerChunk = -999;
|
this.bopWorldFeatures.setFeature("minersDelightPerChunk", -999);
|
||||||
//TODO: FEATURE this.theBiomeDecorator.generateUndergroundLakes = false;
|
//TODO: FEATURE this.theBiomeDecorator.generateUndergroundLakes = false;
|
||||||
this.bopWorldFeatures.generatePumpkins = false;
|
this.bopWorldFeatures.setFeature("generatePumpkins", false);
|
||||||
|
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers2"), 8), 8);
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.yellow_flower, 0), 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -50,25 +51,12 @@ public class BiomeGenOriginValley extends BOPBiome
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HashMap<WorldGenBOPFlora, Integer> getWeightedWorldGenForBOPFlowers()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenBOPFlora, Integer> flowerMap = new HashMap();
|
|
||||||
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers2"), 8), 8);
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(Blocks.yellow_flower, 0), 10);
|
|
||||||
|
|
||||||
return flowerMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
//TODO: getBiomeGrassColor()
|
|
||||||
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
||||||
{
|
{
|
||||||
return 10682207;
|
return 10682207;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeFoliageColor()
|
|
||||||
public int getBiomeFoliageColor(int x, int y, int z)
|
public int getBiomeFoliageColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 3866368;
|
return 3866368;
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.Random;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
|
import biomesoplenty.common.world.features.trees.WorldGenBOPShrub;
|
||||||
|
import biomesoplenty.common.world.features.trees.WorldGenMiniShrub;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBOPShrub;
|
import java.util.Random;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenMiniShrub;
|
|
||||||
|
|
||||||
public class BiomeGenOutback extends BOPBiome
|
public class BiomeGenOutback extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -33,10 +33,10 @@ public class BiomeGenOutback extends BOPBiome
|
||||||
this.theBiomeDecorator.deadBushPerChunk = 7;
|
this.theBiomeDecorator.deadBushPerChunk = 7;
|
||||||
this.theBiomeDecorator.cactiPerChunk = 4;
|
this.theBiomeDecorator.cactiPerChunk = 4;
|
||||||
|
|
||||||
this.bopWorldFeatures.grassSplatterPerChunk = 10;
|
this.bopWorldFeatures.setFeature("grassSplatterPerChunk", 10);
|
||||||
this.bopWorldFeatures.tinyCactiPerChunk = 2;
|
this.bopWorldFeatures.setFeature("tinyCactiPerChunk", 2);
|
||||||
this.bopWorldFeatures.bushesPerChunk = 5;
|
this.bopWorldFeatures.setFeature("bushesPerChunk", 5);
|
||||||
this.bopWorldFeatures.generatePumpkins = false;
|
this.bopWorldFeatures.setFeature("generatePumpkins", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -59,12 +59,10 @@ public class BiomeGenOutback extends BOPBiome
|
||||||
int y = random.nextInt(28) + 4;
|
int y = random.nextInt(28) + 4;
|
||||||
int z = chunkZ + random.nextInt(16);
|
int z = chunkZ + random.nextInt(16);
|
||||||
|
|
||||||
//TODO: getBlock()
|
|
||||||
Block block = world.getBlock(x, y, z);
|
Block block = world.getBlock(x, y, z);
|
||||||
|
|
||||||
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
||||||
{
|
{
|
||||||
//TODO: setBlock()
|
|
||||||
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 2, 2);
|
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 2, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,16 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import java.util.Random;
|
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
||||||
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
|
import biomesoplenty.common.world.features.trees.WorldGenBOPTaiga2;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.entity.passive.EntityHorse;
|
import net.minecraft.entity.passive.EntityHorse;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import java.util.Random;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBOPTaiga2;
|
|
||||||
|
|
||||||
public class BiomeGenPrairie extends BOPBiome
|
public class BiomeGenPrairie extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -22,9 +20,7 @@ public class BiomeGenPrairie extends BOPBiome
|
||||||
{
|
{
|
||||||
super(id);
|
super(id);
|
||||||
|
|
||||||
//TODO: setHeight()
|
|
||||||
this.setHeight(biomeHeight);
|
this.setHeight(biomeHeight);
|
||||||
//TODO: setColor()
|
|
||||||
this.setColor(13165952);
|
this.setColor(13165952);
|
||||||
this.setTemperatureRainfall(0.9F, 0.6F);
|
this.setTemperatureRainfall(0.9F, 0.6F);
|
||||||
|
|
||||||
|
@ -33,12 +29,21 @@ public class BiomeGenPrairie extends BOPBiome
|
||||||
this.theBiomeDecorator.treesPerChunk = 1;
|
this.theBiomeDecorator.treesPerChunk = 1;
|
||||||
this.theBiomeDecorator.grassPerChunk = 999;
|
this.theBiomeDecorator.grassPerChunk = 999;
|
||||||
|
|
||||||
this.bopWorldFeatures.bopFlowersPerChunk = 30;
|
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 30);
|
||||||
this.bopWorldFeatures.portobellosPerChunk = 2;
|
this.bopWorldFeatures.setFeature("portobellosPerChunk", 2);
|
||||||
this.bopWorldFeatures.berryBushesPerChunk = 2;
|
this.bopWorldFeatures.setFeature("berryBushesPerChunk", 2);
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 3;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 3);
|
||||||
this.bopWorldFeatures.waterReedsPerChunk = 4;
|
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 4);
|
||||||
this.bopWorldFeatures.leafPilesPerChunk = 15;
|
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 15);
|
||||||
|
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers2"), 4), 12);
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 9), 6);
|
||||||
|
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -48,31 +53,6 @@ public class BiomeGenPrairie extends BOPBiome
|
||||||
return new WorldGenBOPTaiga2(Blocks.log, Blocks.leaves, 0, 0, false, 6, 1, 7);
|
return new WorldGenBOPTaiga2(Blocks.log, Blocks.leaves, 0, 0, false, 6, 1, 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenBOPFlora, Integer> getWeightedWorldGenForBOPFlowers()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenBOPFlora, Integer> flowerMap = new HashMap();
|
|
||||||
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers2"), 4), 12);
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 9), 6);
|
|
||||||
|
|
||||||
return flowerMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
||||||
{
|
{
|
||||||
|
@ -85,26 +65,22 @@ public class BiomeGenPrairie extends BOPBiome
|
||||||
int y = random.nextInt(28) + 4;
|
int y = random.nextInt(28) + 4;
|
||||||
int z = chunkZ + random.nextInt(16);
|
int z = chunkZ + random.nextInt(16);
|
||||||
|
|
||||||
//TODO: getBlock()
|
|
||||||
Block block = world.getBlock(x, y, z);
|
Block block = world.getBlock(x, y, z);
|
||||||
|
|
||||||
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
||||||
{
|
{
|
||||||
//TODO: setBlock()
|
|
||||||
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 4, 2);
|
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 4, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeGrassColor()
|
|
||||||
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
||||||
{
|
{
|
||||||
return 13165952;
|
return 13165952;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeFoliageColor()
|
|
||||||
public int getBiomeFoliageColor(int x, int y, int z)
|
public int getBiomeFoliageColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 11395195;
|
return 11395195;
|
||||||
|
|
|
@ -1,17 +1,15 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenDeadTree1;
|
import biomesoplenty.common.world.features.trees.WorldGenDeadTree1;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenQuagmire extends BOPBiome
|
public class BiomeGenQuagmire extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -41,9 +39,13 @@ public class BiomeGenQuagmire extends BOPBiome
|
||||||
this.theBiomeDecorator.sandPerChunk = -999;
|
this.theBiomeDecorator.sandPerChunk = -999;
|
||||||
this.theBiomeDecorator.sandPerChunk2 = -999;
|
this.theBiomeDecorator.sandPerChunk2 = -999;
|
||||||
|
|
||||||
this.bopWorldFeatures.waterReedsPerChunk = 2;
|
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 2);
|
||||||
this.bopWorldFeatures.koruPerChunk = 1;
|
this.bopWorldFeatures.setFeature("koruPerChunk", 1);
|
||||||
this.bopWorldFeatures.generateQuagmire = true;
|
this.bopWorldFeatures.setFeature("generateQuagmire", true);
|
||||||
|
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -53,18 +55,6 @@ public class BiomeGenQuagmire extends BOPBiome
|
||||||
return new WorldGenDeadTree1(false, Blocks.dirt, Blocks.grass, BOPBlockHelper.get("driedDirt"), BOPBlockHelper.get("mud"));
|
return new WorldGenDeadTree1(false, Blocks.dirt, Blocks.grass, BOPBlockHelper.get("driedDirt"), BOPBlockHelper.get("mud"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
||||||
{
|
{
|
||||||
|
@ -77,26 +67,22 @@ public class BiomeGenQuagmire extends BOPBiome
|
||||||
int y = random.nextInt(28) + 4;
|
int y = random.nextInt(28) + 4;
|
||||||
int z = chunkZ + random.nextInt(16);
|
int z = chunkZ + random.nextInt(16);
|
||||||
|
|
||||||
//TODO: getBlock()
|
|
||||||
Block block = world.getBlock(x, y, z);
|
Block block = world.getBlock(x, y, z);
|
||||||
|
|
||||||
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
||||||
{
|
{
|
||||||
//TODO: setBlock()
|
|
||||||
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 10, 2);
|
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 10, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeGrassColor()
|
|
||||||
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
||||||
{
|
{
|
||||||
return 10390377;
|
return 10390377;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeFoliageColor()
|
|
||||||
public int getBiomeFoliageColor(int x, int y, int z)
|
public int getBiomeFoliageColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 10390377;
|
return 10390377;
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import java.util.Random;
|
import biomesoplenty.common.entities.EntityJungleSpider;
|
||||||
|
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
||||||
|
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
||||||
|
import biomesoplenty.common.world.features.trees.WorldGenOriginalTree;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.entity.passive.EntityOcelot;
|
import net.minecraft.entity.passive.EntityOcelot;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
|
@ -10,11 +12,8 @@ import net.minecraft.world.World;
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
import net.minecraft.world.gen.feature.WorldGenTallGrass;
|
import net.minecraft.world.gen.feature.WorldGenTallGrass;
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
|
||||||
import biomesoplenty.common.entities.EntityJungleSpider;
|
import java.util.Random;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenOriginalTree;
|
|
||||||
|
|
||||||
public class BiomeGenRainforest extends BOPBiome
|
public class BiomeGenRainforest extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -38,29 +37,21 @@ public class BiomeGenRainforest extends BOPBiome
|
||||||
|
|
||||||
this.theBiomeDecorator.mushroomsPerChunk = 25;
|
this.theBiomeDecorator.mushroomsPerChunk = 25;
|
||||||
|
|
||||||
this.bopWorldFeatures.bopFlowersPerChunk = 25;
|
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 5;
|
|
||||||
this.bopWorldFeatures.cloverPatchesPerChunk = 20;
|
|
||||||
this.bopWorldFeatures.leafPilesPerChunk = 10;
|
|
||||||
this.bopWorldFeatures.seaweedPerChunk = 15;
|
|
||||||
this.bopWorldFeatures.generatePumpkins = false;
|
|
||||||
|
|
||||||
/*TODO: FEATURE customBiomeDecorator.pinkFlowersPerChunk = 2;
|
/*TODO: FEATURE customBiomeDecorator.pinkFlowersPerChunk = 2;
|
||||||
customBiomeDecorator.rosesPerChunk = 10;
|
customBiomeDecorator.rosesPerChunk = 10;
|
||||||
customBiomeDecorator.orangeFlowersPerChunk = 6;*/
|
customBiomeDecorator.orangeFlowersPerChunk = 6;*/
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 25);
|
||||||
public HashMap<WorldGenBOPFlora, Integer> getWeightedWorldGenForBOPFlowers()
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 5);
|
||||||
{
|
this.bopWorldFeatures.setFeature("cloverPatchesPerChunk", 20);
|
||||||
HashMap<WorldGenBOPFlora, Integer> flowerMap = new HashMap();
|
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 10);
|
||||||
|
this.bopWorldFeatures.setFeature("seaweedPerChunk", 15);
|
||||||
|
this.bopWorldFeatures.setFeature("generatePumpkins", false);
|
||||||
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 6), 12);
|
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 6), 12);
|
||||||
flowerMap.put(new WorldGenBOPFlora(Blocks.red_flower, 1), 6);
|
weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 1), 6);
|
||||||
flowerMap.put(new WorldGenBOPDoubleFlora(4, 5), 4);
|
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(4, 5), 4);
|
||||||
flowerMap.put(new WorldGenBOPDoubleFlora(1, 5), 6);
|
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(1, 5), 6);
|
||||||
|
|
||||||
return flowerMap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,20 +1,18 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenShrub;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenRedwoodTree;
|
import biomesoplenty.common.world.features.trees.WorldGenRedwoodTree;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenRedwoodTree2;
|
import biomesoplenty.common.world.features.trees.WorldGenRedwoodTree2;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenShrub;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenRedwoodForest extends BOPBiome
|
public class BiomeGenRedwoodForest extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -24,22 +22,28 @@ public class BiomeGenRedwoodForest extends BOPBiome
|
||||||
{
|
{
|
||||||
super(id);
|
super(id);
|
||||||
|
|
||||||
//TODO: setHeight()
|
|
||||||
this.setHeight(biomeHeight);
|
this.setHeight(biomeHeight);
|
||||||
//TODO: setColor()
|
|
||||||
this.setColor(7187004);
|
this.setColor(7187004);
|
||||||
this.setTemperatureRainfall(0.8F, 0.4F);
|
this.setTemperatureRainfall(0.8F, 0.4F);
|
||||||
|
|
||||||
this.theBiomeDecorator.treesPerChunk = 99;
|
this.theBiomeDecorator.treesPerChunk = 99;
|
||||||
this.theBiomeDecorator.grassPerChunk = 15;
|
this.theBiomeDecorator.grassPerChunk = 15;
|
||||||
|
|
||||||
this.bopWorldFeatures.bopFlowersPerChunk = 5;
|
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 5);
|
||||||
this.bopWorldFeatures.bushesPerChunk = 4;
|
this.bopWorldFeatures.setFeature("bushesPerChunk", 4);
|
||||||
this.bopWorldFeatures.berryBushesPerChunk = 1;
|
this.bopWorldFeatures.setFeature("berryBushesPerChunk", 1);
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 10;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 10);
|
||||||
this.bopWorldFeatures.waterReedsPerChunk = 2;
|
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 2);
|
||||||
this.bopWorldFeatures.leafPilesPerChunk = 15;
|
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 15);
|
||||||
this.bopWorldFeatures.generatePumpkins = false;
|
this.bopWorldFeatures.setFeature("generatePumpkins", false);
|
||||||
|
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(4, 5), 10);
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 1), 8);
|
||||||
|
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -49,30 +53,6 @@ public class BiomeGenRedwoodForest extends BOPBiome
|
||||||
return random.nextInt(2) == 0 ? new WorldGenRedwoodTree2(BOPBlockHelper.get("logs3"), BOPBlockHelper.get("colorizedLeaves1"), 0, 3, false, 20, 15) : (random.nextInt(10) == 0 ? new WorldGenShrub(0,0) : new WorldGenRedwoodTree(BOPBlockHelper.get("logs3"), BOPBlockHelper.get("colorizedLeaves1"), 0, 3, false, 40, 10));
|
return random.nextInt(2) == 0 ? new WorldGenRedwoodTree2(BOPBlockHelper.get("logs3"), BOPBlockHelper.get("colorizedLeaves1"), 0, 3, false, 20, 15) : (random.nextInt(10) == 0 ? new WorldGenShrub(0,0) : new WorldGenRedwoodTree(BOPBlockHelper.get("logs3"), BOPBlockHelper.get("colorizedLeaves1"), 0, 3, false, 40, 10));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenBOPFlora, Integer> getWeightedWorldGenForBOPFlowers()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenBOPFlora, Integer> flowerMap = new HashMap();
|
|
||||||
|
|
||||||
flowerMap.put(new WorldGenBOPDoubleFlora(4, 5), 10);
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(Blocks.red_flower, 1), 8);
|
|
||||||
|
|
||||||
return flowerMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
||||||
{
|
{
|
||||||
|
@ -85,12 +65,10 @@ public class BiomeGenRedwoodForest extends BOPBiome
|
||||||
int y = random.nextInt(28) + 4;
|
int y = random.nextInt(28) + 4;
|
||||||
int z = chunkZ + random.nextInt(16);
|
int z = chunkZ + random.nextInt(16);
|
||||||
|
|
||||||
//TODO: getBlock()
|
|
||||||
Block block = world.getBlock(x, y, z);
|
Block block = world.getBlock(x, y, z);
|
||||||
|
|
||||||
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
||||||
{
|
{
|
||||||
//TODO: setBlock()
|
|
||||||
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 0, 2);
|
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 0, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,5 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenShrub;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenTallGrass;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import biomesoplenty.common.entities.EntityJungleSpider;
|
import biomesoplenty.common.entities.EntityJungleSpider;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
||||||
|
@ -16,6 +7,14 @@ import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenSacredOak;
|
import biomesoplenty.common.world.features.trees.WorldGenSacredOak;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.world.biome.BiomeGenBase;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenShrub;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenTallGrass;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenSacredSprings extends BOPBiome
|
public class BiomeGenSacredSprings extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -34,9 +33,14 @@ public class BiomeGenSacredSprings extends BOPBiome
|
||||||
this.theBiomeDecorator.treesPerChunk = 30;
|
this.theBiomeDecorator.treesPerChunk = 30;
|
||||||
this.theBiomeDecorator.grassPerChunk = 4;
|
this.theBiomeDecorator.grassPerChunk = 4;
|
||||||
this.theBiomeDecorator.waterlilyPerChunk = 5;
|
this.theBiomeDecorator.waterlilyPerChunk = 5;
|
||||||
this.bopWorldFeatures.seaweedPerChunk = 15;
|
|
||||||
|
|
||||||
this.bopWorldFeatures.bopFlowersPerChunk = 2;
|
this.bopWorldFeatures.setFeature("seaweedPerChunk", 15);
|
||||||
|
|
||||||
|
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 2);
|
||||||
|
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 6), 10);
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 1), 6);
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(5, 5), 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -53,27 +57,14 @@ public class BiomeGenSacredSprings extends BOPBiome
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HashMap<WorldGenBOPFlora, Integer> getWeightedWorldGenForBOPFlowers()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenBOPFlora, Integer> flowerMap = new HashMap();
|
|
||||||
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 6), 10);
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(Blocks.red_flower, 1), 6);
|
|
||||||
flowerMap.put(new WorldGenBOPDoubleFlora(5, 5), 5);
|
|
||||||
|
|
||||||
return flowerMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
//TODO: getBiomeGrassColor()
|
|
||||||
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
||||||
{
|
{
|
||||||
double d0 = plantNoise.func_151601_a((double)p_150558_1_ * 0.0225D, (double)p_150558_3_ * 0.0225D);
|
double d0 = plantNoise.func_151601_a((double)p_150558_1_ * 0.0225D, (double)p_150558_3_ * 0.0225D);
|
||||||
return d0 < -0.1D ? 39285 : 39259;
|
return d0 < -0.1D ? 39285 : 39259;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
//TODO: getBiomeFoliageColor()
|
|
||||||
public int getBiomeFoliageColor(int x, int y, int z)
|
public int getBiomeFoliageColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
double d0 = plantNoise.func_151601_a((double)x * 0.0225D, (double)z* 0.0225D);
|
double d0 = plantNoise.func_151601_a((double)x * 0.0225D, (double)z* 0.0225D);
|
||||||
|
|
|
@ -1,18 +1,16 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import java.util.Random;
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
|
import biomesoplenty.common.world.features.trees.WorldGenBOPBigTree;
|
||||||
|
import biomesoplenty.common.world.features.trees.WorldGenOriginalTree;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.entity.passive.EntityWolf;
|
import net.minecraft.entity.passive.EntityWolf;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import java.util.Random;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBOPBigTree;
|
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenOriginalTree;
|
|
||||||
|
|
||||||
public class BiomeGenSeasonalForest extends BOPBiome
|
public class BiomeGenSeasonalForest extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -22,9 +20,7 @@ public class BiomeGenSeasonalForest extends BOPBiome
|
||||||
{
|
{
|
||||||
super(id);
|
super(id);
|
||||||
|
|
||||||
//TODO: setHeight()
|
|
||||||
this.setHeight(biomeHeight);
|
this.setHeight(biomeHeight);
|
||||||
//TODO: setColor()
|
|
||||||
this.setColor(12502092);
|
this.setColor(12502092);
|
||||||
this.setTemperatureRainfall(0.7F, 0.8F);
|
this.setTemperatureRainfall(0.7F, 0.8F);
|
||||||
|
|
||||||
|
@ -34,24 +30,16 @@ public class BiomeGenSeasonalForest extends BOPBiome
|
||||||
this.theBiomeDecorator.grassPerChunk = 8;
|
this.theBiomeDecorator.grassPerChunk = 8;
|
||||||
this.theBiomeDecorator.flowersPerChunk = -999;
|
this.theBiomeDecorator.flowersPerChunk = -999;
|
||||||
|
|
||||||
this.bopWorldFeatures.toadstoolsPerChunk = 4;
|
this.bopWorldFeatures.setFeature("toadstoolsPerChunk", 4);
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 15;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 15);
|
||||||
this.bopWorldFeatures.waterReedsPerChunk = 4;
|
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 4);
|
||||||
this.bopWorldFeatures.leafPilesPerChunk = 8;
|
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 8);
|
||||||
this.bopWorldFeatures.deadLeafPilesPerChunk = 15;
|
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 15);
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
{
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 0.5D);
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -92,14 +80,12 @@ public class BiomeGenSeasonalForest extends BOPBiome
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeFoliageColor()
|
|
||||||
public int getBiomeFoliageColor(int x, int y, int z)
|
public int getBiomeFoliageColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 11781186;
|
return 11781186;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeGrassColor()
|
|
||||||
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
||||||
{
|
{
|
||||||
return 12502092;
|
return 12502092;
|
||||||
|
|
|
@ -1,18 +1,16 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenShrub;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
import biomesoplenty.common.world.features.WorldGenMoss;
|
import biomesoplenty.common.world.features.WorldGenMoss;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBOPTaiga2;
|
import biomesoplenty.common.world.features.trees.WorldGenBOPTaiga2;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenPineTree;
|
import biomesoplenty.common.world.features.trees.WorldGenPineTree;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenShrub;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenShield extends BOPBiome
|
public class BiomeGenShield extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -34,11 +32,15 @@ public class BiomeGenShield extends BOPBiome
|
||||||
this.theBiomeDecorator.sandPerChunk = -999;
|
this.theBiomeDecorator.sandPerChunk = -999;
|
||||||
this.theBiomeDecorator.sandPerChunk2 = -999;
|
this.theBiomeDecorator.sandPerChunk2 = -999;
|
||||||
|
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 4;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 4);
|
||||||
this.bopWorldFeatures.waterReedsPerChunk = 4;
|
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 4);
|
||||||
this.bopWorldFeatures.leafPilesPerChunk = 10;
|
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 10);
|
||||||
this.bopWorldFeatures.seaweedPerChunk = 5;
|
this.bopWorldFeatures.setFeature("seaweedPerChunk", 5);
|
||||||
this.bopWorldFeatures.generateStoneInGrass2 = true;
|
this.bopWorldFeatures.setFeature("generateStoneInGrass2", true);
|
||||||
|
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -51,18 +53,6 @@ public class BiomeGenShield extends BOPBiome
|
||||||
new WorldGenBOPTaiga2(Blocks.log, Blocks.leaves, 1, 1, false, 9, 9, 6)));
|
new WorldGenBOPTaiga2(Blocks.log, Blocks.leaves, 1, 1, false, 9, 9, 6)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import java.util.Random;
|
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.entity.passive.EntityHorse;
|
import net.minecraft.entity.passive.EntityHorse;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
|
@ -11,8 +10,8 @@ import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
import net.minecraft.world.gen.feature.WorldGenShrub;
|
import net.minecraft.world.gen.feature.WorldGenShrub;
|
||||||
import net.minecraft.world.gen.feature.WorldGenTallGrass;
|
import net.minecraft.world.gen.feature.WorldGenTallGrass;
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenShrubland extends BOPBiome
|
public class BiomeGenShrubland extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -34,11 +33,13 @@ public class BiomeGenShrubland extends BOPBiome
|
||||||
this.theBiomeDecorator.flowersPerChunk = 0;
|
this.theBiomeDecorator.flowersPerChunk = 0;
|
||||||
this.theBiomeDecorator.grassPerChunk = 5;
|
this.theBiomeDecorator.grassPerChunk = 5;
|
||||||
|
|
||||||
this.bopWorldFeatures.bopFlowersPerChunk = 5;
|
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 5);
|
||||||
this.bopWorldFeatures.bushesPerChunk = 7;
|
this.bopWorldFeatures.setFeature("bushesPerChunk", 7);
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 5;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 5);
|
||||||
this.bopWorldFeatures.waterReedsPerChunk = 3;
|
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 3);
|
||||||
this.bopWorldFeatures.generatePumpkins = false;
|
this.bopWorldFeatures.setFeature("generatePumpkins", false);
|
||||||
|
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 2), 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -48,16 +49,6 @@ public class BiomeGenShrubland extends BOPBiome
|
||||||
return new WorldGenShrub(0, 0);
|
return new WorldGenShrub(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenBOPFlora, Integer> getWeightedWorldGenForBOPFlowers()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenBOPFlora, Integer> flowerMap = new HashMap();
|
|
||||||
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(Blocks.red_flower, 2), 4);
|
|
||||||
|
|
||||||
return flowerMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public WorldGenerator getRandomWorldGenForGrass(Random random)
|
public WorldGenerator getRandomWorldGenForGrass(Random random)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,19 +1,17 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.entity.monster.EntitySpider;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBOPSwampTree;
|
import biomesoplenty.common.world.features.trees.WorldGenBOPSwampTree;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenDeadTree1;
|
import biomesoplenty.common.world.features.trees.WorldGenDeadTree1;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.entity.monster.EntitySpider;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenSilkglades extends BOPBiome
|
public class BiomeGenSilkglades extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -44,14 +42,17 @@ public class BiomeGenSilkglades extends BOPBiome
|
||||||
this.theBiomeDecorator.sandPerChunk = -999;
|
this.theBiomeDecorator.sandPerChunk = -999;
|
||||||
this.theBiomeDecorator.sandPerChunk2 = -999;
|
this.theBiomeDecorator.sandPerChunk2 = -999;
|
||||||
|
|
||||||
this.bopWorldFeatures.sproutsPerChunk = 2;
|
this.bopWorldFeatures.setFeature("sproutsPerChunk", 2);
|
||||||
this.bopWorldFeatures.poisonIvyPerChunk = 2;
|
this.bopWorldFeatures.setFeature("poisonIvyPerChunk", 2);
|
||||||
this.bopWorldFeatures.cobwebsPerChunk = 9;
|
this.bopWorldFeatures.setFeature("cobwebsPerChunk", 9);
|
||||||
this.bopWorldFeatures.waterReedsPerChunk = 4;
|
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 4);
|
||||||
this.bopWorldFeatures.koruPerChunk = 1;
|
this.bopWorldFeatures.setFeature("koruPerChunk", 1);
|
||||||
this.bopWorldFeatures.generatePumpkins = true;
|
this.bopWorldFeatures.setFeature("cobwebNestsPerChunk", 2);
|
||||||
this.bopWorldFeatures.cobwebNestsPerChunk = 2;
|
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 15);
|
||||||
this.bopWorldFeatures.deadLeafPilesPerChunk = 15;
|
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 0), 1D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -63,18 +64,6 @@ public class BiomeGenSilkglades extends BOPBiome
|
||||||
new WorldGenBOPSwampTree(BOPBlockHelper.get("logs3"), BOPBlockHelper.get("colorizedLeaves2"), 1, 0, 6, 9, BOPBlockHelper.get("colorizedLeaves2"), 0));
|
new WorldGenBOPSwampTree(BOPBlockHelper.get("logs3"), BOPBlockHelper.get("colorizedLeaves2"), 1, 0, 6, 9, BOPBlockHelper.get("colorizedLeaves2"), 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 0), 1D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
||||||
{
|
{
|
||||||
|
@ -87,26 +76,22 @@ public class BiomeGenSilkglades extends BOPBiome
|
||||||
int y = random.nextInt(28) + 4;
|
int y = random.nextInt(28) + 4;
|
||||||
int z = chunkZ + random.nextInt(16);
|
int z = chunkZ + random.nextInt(16);
|
||||||
|
|
||||||
//TODO: getBlock()
|
|
||||||
Block block = world.getBlock(x, y, z);
|
Block block = world.getBlock(x, y, z);
|
||||||
|
|
||||||
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
||||||
{
|
{
|
||||||
//TODO: setBlock()
|
|
||||||
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 10, 2);
|
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 10, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeGrassColor()
|
|
||||||
public int getBiomeGrassColor(int x, int y, int z)
|
public int getBiomeGrassColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 13420973;
|
return 13420973;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeFoliageColor()
|
|
||||||
public int getBiomeFoliageColor(int x, int y, int z)
|
public int getBiomeFoliageColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 14146486;
|
return 14146486;
|
||||||
|
|
|
@ -1,19 +1,17 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.entity.monster.EntitySlime;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBogTree1;
|
import biomesoplenty.common.world.features.trees.WorldGenBogTree1;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBogTree2;
|
import biomesoplenty.common.world.features.trees.WorldGenBogTree2;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.entity.monster.EntitySlime;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenSludgepit extends BOPBiome
|
public class BiomeGenSludgepit extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -44,13 +42,18 @@ public class BiomeGenSludgepit extends BOPBiome
|
||||||
this.theBiomeDecorator.sandPerChunk2 = -999;
|
this.theBiomeDecorator.sandPerChunk2 = -999;
|
||||||
this.theBiomeDecorator.deadBushPerChunk = 5;
|
this.theBiomeDecorator.deadBushPerChunk = 5;
|
||||||
|
|
||||||
this.bopWorldFeatures.mudPerChunk = 5;
|
this.bopWorldFeatures.setFeature("mudPerChunk", 5);
|
||||||
this.bopWorldFeatures.algaePerChunk = 2;
|
this.bopWorldFeatures.setFeature("algaePerChunk", 2);
|
||||||
//TODO: FEATURE customBiomeDecorator.poisonWaterPerChunk = 5;
|
//TODO: FEATURE customBiomeDecorator.poisonWaterPerChunk = 5;
|
||||||
this.bopWorldFeatures.waterReedsPerChunk = 6;
|
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 6);
|
||||||
this.bopWorldFeatures.koruPerChunk = 1;
|
this.bopWorldFeatures.setFeature("koruPerChunk", 1);
|
||||||
this.bopWorldFeatures.leafPilesPerChunk = 5;
|
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 5);
|
||||||
this.bopWorldFeatures.deadLeafPilesPerChunk = 5;
|
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 5);
|
||||||
|
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 0), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -61,19 +64,6 @@ public class BiomeGenSludgepit extends BOPBiome
|
||||||
new WorldGenBogTree1(Blocks.log2, Blocks.leaves2, 1, 1, false, 7, 5);
|
new WorldGenBogTree1(Blocks.log2, Blocks.leaves2, 1, 1, false, 7, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 0), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
||||||
{
|
{
|
||||||
|
@ -86,26 +76,22 @@ public class BiomeGenSludgepit extends BOPBiome
|
||||||
int y = random.nextInt(28) + 4;
|
int y = random.nextInt(28) + 4;
|
||||||
int z = chunkZ + random.nextInt(16);
|
int z = chunkZ + random.nextInt(16);
|
||||||
|
|
||||||
//TODO: getBlock()
|
|
||||||
Block block = world.getBlock(x, y, z);
|
Block block = world.getBlock(x, y, z);
|
||||||
|
|
||||||
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
||||||
{
|
{
|
||||||
//TODO: setBlock()
|
|
||||||
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 10, 2);
|
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 10, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeGrassColor()
|
|
||||||
public int getBiomeGrassColor(int x, int y, int z)
|
public int getBiomeGrassColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 7627817;
|
return 7627817;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeFoliageColor()
|
|
||||||
public int getBiomeFoliageColor(int x, int y, int z)
|
public int getBiomeFoliageColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 9539892;
|
return 9539892;
|
||||||
|
|
|
@ -1,19 +1,17 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import java.util.Random;
|
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
||||||
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
|
import biomesoplenty.common.world.features.trees.WorldGenBOPTaiga2;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.entity.passive.EntityWolf;
|
import net.minecraft.entity.passive.EntityWolf;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
import net.minecraft.world.gen.feature.WorldGenTaiga2;
|
import net.minecraft.world.gen.feature.WorldGenTaiga2;
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import java.util.Random;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBOPTaiga2;
|
|
||||||
|
|
||||||
public class BiomeGenSpruceWoods extends BOPBiome
|
public class BiomeGenSpruceWoods extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -31,13 +29,19 @@ public class BiomeGenSpruceWoods extends BOPBiome
|
||||||
this.theBiomeDecorator.grassPerChunk = 6;
|
this.theBiomeDecorator.grassPerChunk = 6;
|
||||||
this.theBiomeDecorator.mushroomsPerChunk = 4;
|
this.theBiomeDecorator.mushroomsPerChunk = 4;
|
||||||
|
|
||||||
this.bopWorldFeatures.bopFlowersPerChunk = 100;
|
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 100);
|
||||||
this.bopWorldFeatures.poisonIvyPerChunk = 1;
|
this.bopWorldFeatures.setFeature("poisonIvyPerChunk", 1);
|
||||||
this.bopWorldFeatures.sproutsPerChunk = 3;
|
this.bopWorldFeatures.setFeature("sproutsPerChunk", 3);
|
||||||
this.bopWorldFeatures.berryBushesPerChunk = 3;
|
this.bopWorldFeatures.setFeature("berryBushesPerChunk", 3);
|
||||||
this.bopWorldFeatures.wildCarrotsPerChunk = 1;
|
this.bopWorldFeatures.setFeature("wildCarrotsPerChunk", 1);
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 5;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 5);
|
||||||
this.bopWorldFeatures.waterReedsPerChunk = 2;
|
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 2);
|
||||||
|
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers2"), 5), 15);
|
||||||
|
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -48,28 +52,6 @@ public class BiomeGenSpruceWoods extends BOPBiome
|
||||||
new WorldGenTaiga2(false);
|
new WorldGenTaiga2(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenBOPFlora, Integer> getWeightedWorldGenForBOPFlowers()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenBOPFlora, Integer> flowerMap = new HashMap();
|
|
||||||
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers2"), 5), 15);
|
|
||||||
|
|
||||||
return flowerMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,14 +1,5 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenShrub;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
||||||
|
@ -17,6 +8,13 @@ import biomesoplenty.common.world.features.WorldGenMoss;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBOPSwampTree;
|
import biomesoplenty.common.world.features.trees.WorldGenBOPSwampTree;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBOPTaiga2;
|
import biomesoplenty.common.world.features.trees.WorldGenBOPTaiga2;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBOPTaiga3;
|
import biomesoplenty.common.world.features.trees.WorldGenBOPTaiga3;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenShrub;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenTemperateRainforest extends BOPBiome
|
public class BiomeGenTemperateRainforest extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -26,9 +24,7 @@ public class BiomeGenTemperateRainforest extends BOPBiome
|
||||||
{
|
{
|
||||||
super(id);
|
super(id);
|
||||||
|
|
||||||
//TODO: setHeight()
|
|
||||||
this.setHeight(biomeHeight);
|
this.setHeight(biomeHeight);
|
||||||
//TODO: setColor()
|
|
||||||
this.setColor(12311907);
|
this.setColor(12311907);
|
||||||
this.setTemperatureRainfall(0.7F, 0.8F);
|
this.setTemperatureRainfall(0.7F, 0.8F);
|
||||||
|
|
||||||
|
@ -38,14 +34,22 @@ public class BiomeGenTemperateRainforest extends BOPBiome
|
||||||
this.theBiomeDecorator.sandPerChunk = -999;
|
this.theBiomeDecorator.sandPerChunk = -999;
|
||||||
this.theBiomeDecorator.sandPerChunk2 = -999;
|
this.theBiomeDecorator.sandPerChunk2 = -999;
|
||||||
|
|
||||||
this.bopWorldFeatures.generatePumpkins = false;
|
this.bopWorldFeatures.setFeature("generatePumpkins", false);
|
||||||
this.bopWorldFeatures.blueMilksPerChunk = 3;
|
this.bopWorldFeatures.setFeature("blueMilksPerChunk", 3);
|
||||||
this.bopWorldFeatures.poisonIvyPerChunk = 1;
|
this.bopWorldFeatures.setFeature("poisonIvyPerChunk", 1);
|
||||||
this.bopWorldFeatures.wildCarrotsPerChunk = 1;
|
this.bopWorldFeatures.setFeature("wildCarrotsPerChunk", 1);
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 10;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 10);
|
||||||
this.bopWorldFeatures.waterReedsPerChunk = 2;
|
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 2);
|
||||||
this.bopWorldFeatures.leafPilesPerChunk = 15;
|
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 15);
|
||||||
this.bopWorldFeatures.seaweedPerChunk = 15;
|
this.bopWorldFeatures.setFeature("seaweedPerChunk", 15);
|
||||||
|
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 1D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 2D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPDoubleFlora(3), 0.25D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -58,22 +62,6 @@ public class BiomeGenTemperateRainforest extends BOPBiome
|
||||||
new WorldGenShrub(0, 0)));
|
new WorldGenShrub(0, 0)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 1D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 2D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPDoubleFlora(3), 0.25D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
||||||
{
|
{
|
||||||
|
@ -107,14 +95,12 @@ public class BiomeGenTemperateRainforest extends BOPBiome
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeGrassColor()
|
|
||||||
public int getBiomeGrassColor(int x, int y, int z)
|
public int getBiomeGrassColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 11981671;
|
return 11981671;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeFoliageColor()
|
|
||||||
public int getBiomeFoliageColor(int x, int y, int z)
|
public int getBiomeFoliageColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 12311907;
|
return 12311907;
|
||||||
|
|
|
@ -1,15 +1,14 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import java.util.Random;
|
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
||||||
|
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
import net.minecraft.world.gen.feature.WorldGenShrub;
|
import net.minecraft.world.gen.feature.WorldGenShrub;
|
||||||
import net.minecraft.world.gen.feature.WorldGenTallGrass;
|
import net.minecraft.world.gen.feature.WorldGenTallGrass;
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenThicket extends BOPBiome
|
public class BiomeGenThicket extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -19,20 +18,20 @@ public class BiomeGenThicket extends BOPBiome
|
||||||
{
|
{
|
||||||
super(id);
|
super(id);
|
||||||
|
|
||||||
//TODO: setHeight()
|
|
||||||
this.setHeight(biomeHeight);
|
this.setHeight(biomeHeight);
|
||||||
//TODO: setColor()
|
|
||||||
this.setColor(7248193);
|
this.setColor(7248193);
|
||||||
this.setTemperatureRainfall(0.6F, 0.2F);
|
this.setTemperatureRainfall(0.6F, 0.2F);
|
||||||
|
|
||||||
this.theBiomeDecorator.treesPerChunk = 17;
|
this.theBiomeDecorator.treesPerChunk = 17;
|
||||||
this.theBiomeDecorator.grassPerChunk = 1;
|
this.theBiomeDecorator.grassPerChunk = 1;
|
||||||
|
|
||||||
this.bopWorldFeatures.bopFlowersPerChunk = 5;
|
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 5);
|
||||||
this.bopWorldFeatures.thornsPerChunk = 55;
|
this.bopWorldFeatures.setFeature("thornsPerChunk", 55);
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 5;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 5);
|
||||||
this.bopWorldFeatures.leafPilesPerChunk = 10;
|
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 10);
|
||||||
this.bopWorldFeatures.deadLeafPilesPerChunk = 5;
|
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 5);
|
||||||
|
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 2), 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -42,16 +41,6 @@ public class BiomeGenThicket extends BOPBiome
|
||||||
return random.nextInt(5) == 0 ? worldGeneratorTrees : new WorldGenShrub(0, 0);
|
return random.nextInt(5) == 0 ? worldGeneratorTrees : new WorldGenShrub(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenBOPFlora, Integer> getWeightedWorldGenForBOPFlowers()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenBOPFlora, Integer> flowerMap = new HashMap();
|
|
||||||
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(Blocks.red_flower, 2), 4);
|
|
||||||
|
|
||||||
return flowerMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public WorldGenerator getRandomWorldGenForGrass(Random random)
|
public WorldGenerator getRandomWorldGenForGrass(Random random)
|
||||||
{
|
{
|
||||||
|
@ -59,14 +48,12 @@ public class BiomeGenThicket extends BOPBiome
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeGrassColor()
|
|
||||||
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
||||||
{
|
{
|
||||||
return 11049591;
|
return 11049591;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeFoliageColor()
|
|
||||||
public int getBiomeFoliageColor(int x, int y, int z)
|
public int getBiomeFoliageColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 10854765;
|
return 10854765;
|
||||||
|
|
|
@ -1,18 +1,16 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenChaparral3;
|
import biomesoplenty.common.world.features.trees.WorldGenChaparral3;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenCypress;
|
import biomesoplenty.common.world.features.trees.WorldGenCypress;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenMiniShrub;
|
import biomesoplenty.common.world.features.trees.WorldGenMiniShrub;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenTimber extends BOPBiome
|
public class BiomeGenTimber extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -22,9 +20,7 @@ public class BiomeGenTimber extends BOPBiome
|
||||||
{
|
{
|
||||||
super(id);
|
super(id);
|
||||||
|
|
||||||
//TODO: setHeight()
|
|
||||||
this.setHeight(biomeHeight);
|
this.setHeight(biomeHeight);
|
||||||
//TODO: setColor()
|
|
||||||
this.setColor(10923366);
|
this.setColor(10923366);
|
||||||
this.setTemperatureRainfall(0.7F, 0.8F);
|
this.setTemperatureRainfall(0.7F, 0.8F);
|
||||||
|
|
||||||
|
@ -32,12 +28,17 @@ public class BiomeGenTimber extends BOPBiome
|
||||||
this.theBiomeDecorator.grassPerChunk = 8;
|
this.theBiomeDecorator.grassPerChunk = 8;
|
||||||
this.theBiomeDecorator.flowersPerChunk = -999;
|
this.theBiomeDecorator.flowersPerChunk = -999;
|
||||||
|
|
||||||
this.bopWorldFeatures.thornsPerChunk = 2;
|
this.bopWorldFeatures.setFeature("thornsPerChunk", 2);
|
||||||
this.bopWorldFeatures.toadstoolsPerChunk = 2;
|
this.bopWorldFeatures.setFeature("toadstoolsPerChunk", 2);
|
||||||
this.bopWorldFeatures.waterReedsPerChunk = 4;
|
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 4);
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 10;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 10);
|
||||||
this.bopWorldFeatures.leafPilesPerChunk = 5;
|
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 5);
|
||||||
this.bopWorldFeatures.deadLeafPilesPerChunk = 12;
|
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 12);
|
||||||
|
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 1D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -50,19 +51,6 @@ public class BiomeGenTimber extends BOPBiome
|
||||||
new WorldGenCypress(Blocks.log, Blocks.leaves, 0, 0, false, 10, 15, 2));
|
new WorldGenCypress(Blocks.log, Blocks.leaves, 0, 0, false, 10, 15, 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 1D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
||||||
{
|
{
|
||||||
|
@ -75,26 +63,22 @@ public class BiomeGenTimber extends BOPBiome
|
||||||
int y = random.nextInt(28) + 4;
|
int y = random.nextInt(28) + 4;
|
||||||
int z = chunkZ + random.nextInt(16);
|
int z = chunkZ + random.nextInt(16);
|
||||||
|
|
||||||
//TODO: getBlock()
|
|
||||||
Block block = world.getBlock(x, y, z);
|
Block block = world.getBlock(x, y, z);
|
||||||
|
|
||||||
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
||||||
{
|
{
|
||||||
//TODO: setBlock()
|
|
||||||
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 0, 2);
|
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 0, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeGrassColor()
|
|
||||||
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
||||||
{
|
{
|
||||||
return 10923366;
|
return 10923366;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeFoliageColor()
|
|
||||||
public int getBiomeFoliageColor(int x, int y, int z)
|
public int getBiomeFoliageColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 11049817;
|
return 11049817;
|
||||||
|
|
|
@ -1,15 +1,5 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.entity.passive.EntityOcelot;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenTrees;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
||||||
import biomesoplenty.common.entities.EntityJungleSpider;
|
import biomesoplenty.common.entities.EntityJungleSpider;
|
||||||
|
@ -17,6 +7,14 @@ import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenRainforestTree1;
|
import biomesoplenty.common.world.features.trees.WorldGenRainforestTree1;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.entity.passive.EntityOcelot;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenTrees;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenTropicalRainforest extends BOPBiome
|
public class BiomeGenTropicalRainforest extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -26,9 +24,7 @@ public class BiomeGenTropicalRainforest extends BOPBiome
|
||||||
{
|
{
|
||||||
super(id);
|
super(id);
|
||||||
|
|
||||||
//TODO: setHeight()
|
|
||||||
this.setHeight(biomeHeight);
|
this.setHeight(biomeHeight);
|
||||||
//TODO: setColor()
|
|
||||||
this.setColor(8970560);
|
this.setColor(8970560);
|
||||||
this.setTemperatureRainfall(1.2F, 0.9F);
|
this.setTemperatureRainfall(1.2F, 0.9F);
|
||||||
|
|
||||||
|
@ -42,15 +38,23 @@ public class BiomeGenTropicalRainforest extends BOPBiome
|
||||||
this.theBiomeDecorator.reedsPerChunk = 10;
|
this.theBiomeDecorator.reedsPerChunk = 10;
|
||||||
this.theBiomeDecorator.waterlilyPerChunk = 2;
|
this.theBiomeDecorator.waterlilyPerChunk = 2;
|
||||||
|
|
||||||
this.bopWorldFeatures.bopFlowersPerChunk = 10;
|
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 10);
|
||||||
this.bopWorldFeatures.generatePumpkins = false;
|
this.bopWorldFeatures.setFeature("generatePumpkins", false);
|
||||||
this.bopWorldFeatures.generateMelons = true;
|
this.bopWorldFeatures.setFeature("generateMelons", true);
|
||||||
this.bopWorldFeatures.sproutsPerChunk = 2;
|
this.bopWorldFeatures.setFeature("sproutsPerChunk", 2);
|
||||||
this.bopWorldFeatures.generateQuicksand = true;
|
this.bopWorldFeatures.setFeature("generateQuicksand", true);
|
||||||
this.bopWorldFeatures.poisonIvyPerChunk = 4;
|
this.bopWorldFeatures.setFeature("poisonIvyPerChunk", 4);
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 15;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 15);
|
||||||
this.bopWorldFeatures.leafPilesPerChunk = 10;
|
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 10);
|
||||||
this.bopWorldFeatures.seaweedPerChunk = 15;
|
this.bopWorldFeatures.setFeature("seaweedPerChunk", 15);
|
||||||
|
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 5), 12);
|
||||||
|
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 0.75D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPDoubleFlora(3), 1D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -61,30 +65,6 @@ public class BiomeGenTropicalRainforest extends BOPBiome
|
||||||
new WorldGenRainforestTree1(BOPBlockHelper.get("logs4"), BOPBlockHelper.get("colorizedLeaves2"), 3, 2, false, 8, 8);
|
new WorldGenRainforestTree1(BOPBlockHelper.get("logs4"), BOPBlockHelper.get("colorizedLeaves2"), 3, 2, false, 8, 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenBOPFlora, Integer> getWeightedWorldGenForBOPFlowers()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenBOPFlora, Integer> flowerMap = new HashMap();
|
|
||||||
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 5), 12);
|
|
||||||
|
|
||||||
return flowerMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 0.75D);
|
|
||||||
grassMap.put(new WorldGenBOPDoubleFlora(3), 1D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
||||||
{
|
{
|
||||||
|
@ -97,19 +77,16 @@ public class BiomeGenTropicalRainforest extends BOPBiome
|
||||||
int y = random.nextInt(28) + 4;
|
int y = random.nextInt(28) + 4;
|
||||||
int z = chunkZ + random.nextInt(16);
|
int z = chunkZ + random.nextInt(16);
|
||||||
|
|
||||||
//TODO: getBlock()
|
|
||||||
Block block = world.getBlock(x, y, z);
|
Block block = world.getBlock(x, y, z);
|
||||||
|
|
||||||
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
||||||
{
|
{
|
||||||
//TODO: setBlock()
|
|
||||||
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 6, 2);
|
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 6, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeGrassColor()
|
|
||||||
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
||||||
{
|
{
|
||||||
return 11002176;
|
return 11002176;
|
||||||
|
@ -117,7 +94,6 @@ public class BiomeGenTropicalRainforest extends BOPBiome
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeFoliageColor()
|
|
||||||
public int getBiomeFoliageColor(int x, int y, int z)
|
public int getBiomeFoliageColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 8970560;
|
return 8970560;
|
||||||
|
|
|
@ -1,14 +1,5 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenShrub;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
||||||
import biomesoplenty.common.entities.EntityJungleSpider;
|
import biomesoplenty.common.entities.EntityJungleSpider;
|
||||||
|
@ -17,6 +8,13 @@ import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenPalmTree1;
|
import biomesoplenty.common.world.features.trees.WorldGenPalmTree1;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenTropicsShrub;
|
import biomesoplenty.common.world.features.trees.WorldGenTropicsShrub;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenShrub;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenTropics extends BOPBiome
|
public class BiomeGenTropics extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -42,11 +40,23 @@ public class BiomeGenTropics extends BOPBiome
|
||||||
this.theBiomeDecorator.sandPerChunk = 50;
|
this.theBiomeDecorator.sandPerChunk = 50;
|
||||||
this.theBiomeDecorator.sandPerChunk2 = 50;
|
this.theBiomeDecorator.sandPerChunk2 = 50;
|
||||||
|
|
||||||
this.bopWorldFeatures.bopFlowersPerChunk = 30;
|
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 30);
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 4;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 4);
|
||||||
this.bopWorldFeatures.leafPilesPerChunk = 10;
|
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 10);
|
||||||
this.bopWorldFeatures.seaweedPerChunk = 10;
|
this.bopWorldFeatures.setFeature("seaweedPerChunk", 10);
|
||||||
this.bopWorldFeatures.generatePumpkins = false;
|
this.bopWorldFeatures.setFeature("generatePumpkins", false);
|
||||||
|
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 9), 8);
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 5), 10);
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers2"), 0), 15);
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 1), 7);
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(4, 5), 6);
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(0, 3), 2);
|
||||||
|
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPDoubleFlora(3), 0.25D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -58,34 +68,6 @@ public class BiomeGenTropics extends BOPBiome
|
||||||
new WorldGenShrub(0, 0));
|
new WorldGenShrub(0, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenBOPFlora, Integer> getWeightedWorldGenForBOPFlowers()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenBOPFlora, Integer> flowerMap = new HashMap();
|
|
||||||
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 9), 8);
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 5), 10);
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers2"), 0), 15);
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(Blocks.red_flower, 1), 7);
|
|
||||||
flowerMap.put(new WorldGenBOPDoubleFlora(4, 5), 6);
|
|
||||||
flowerMap.put(new WorldGenBOPDoubleFlora(0, 3), 2);
|
|
||||||
|
|
||||||
return flowerMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
|
||||||
grassMap.put(new WorldGenBOPDoubleFlora(3), 0.25D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,17 +1,15 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import java.util.Random;
|
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
||||||
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
import net.minecraft.world.gen.feature.WorldGenShrub;
|
import net.minecraft.world.gen.feature.WorldGenShrub;
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import java.util.Random;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
|
||||||
|
|
||||||
public class BiomeGenTundra extends BOPBiome
|
public class BiomeGenTundra extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -35,10 +33,17 @@ public class BiomeGenTundra extends BOPBiome
|
||||||
this.theBiomeDecorator.reedsPerChunk = -999;
|
this.theBiomeDecorator.reedsPerChunk = -999;
|
||||||
this.theBiomeDecorator.sandPerChunk = 8;
|
this.theBiomeDecorator.sandPerChunk = 8;
|
||||||
|
|
||||||
this.bopWorldFeatures.bopFlowersPerChunk = 1;
|
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 1);
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 2;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 2);
|
||||||
this.bopWorldFeatures.waterReedsPerChunk = 2;
|
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 2);
|
||||||
this.bopWorldFeatures.rockpilesPerChunk = 25;
|
this.bopWorldFeatures.setFeature("rockpilesPerChunk", 25);
|
||||||
|
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 8), 4);
|
||||||
|
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 1D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -48,29 +53,6 @@ public class BiomeGenTundra extends BOPBiome
|
||||||
return new WorldGenShrub(0, 0);
|
return new WorldGenShrub(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenBOPFlora, Integer> getWeightedWorldGenForBOPFlowers()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenBOPFlora, Integer> flowerMap = new HashMap();
|
|
||||||
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 8), 4);
|
|
||||||
|
|
||||||
return flowerMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 1D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
||||||
{
|
{
|
||||||
|
@ -83,26 +65,22 @@ public class BiomeGenTundra extends BOPBiome
|
||||||
int y = random.nextInt(28) + 4;
|
int y = random.nextInt(28) + 4;
|
||||||
int z = chunkZ + random.nextInt(16);
|
int z = chunkZ + random.nextInt(16);
|
||||||
|
|
||||||
//TODO: getBlock()
|
|
||||||
Block block = world.getBlock(x, y, z);
|
Block block = world.getBlock(x, y, z);
|
||||||
|
|
||||||
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
||||||
{
|
{
|
||||||
//TODO: setBlock()
|
|
||||||
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 8, 2);
|
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 8, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeGrassColor()
|
|
||||||
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
||||||
{
|
{
|
||||||
return 11371606;
|
return 11371606;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeFoliageColor()
|
|
||||||
public int getBiomeFoliageColor(int x, int y, int z)
|
public int getBiomeFoliageColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 12543566;
|
return 12543566;
|
||||||
|
|
|
@ -26,9 +26,9 @@ public class BiomeGenVolcano extends BOPBiome
|
||||||
this.theBiomeDecorator.flowersPerChunk = -999;
|
this.theBiomeDecorator.flowersPerChunk = -999;
|
||||||
this.theBiomeDecorator.grassPerChunk = -999;
|
this.theBiomeDecorator.grassPerChunk = -999;
|
||||||
|
|
||||||
this.bopWorldFeatures.lavaLakesPerChunk = 50;
|
this.bopWorldFeatures.setFeature("lavaLakesPerChunk", 50);
|
||||||
this.bopWorldFeatures.lavaSpoutsPerChunk = 10;
|
this.bopWorldFeatures.setFeature("lavaSpoutsPerChunk", 10);
|
||||||
this.bopWorldFeatures.generateAsh = true;
|
this.bopWorldFeatures.setFeature("generateAsh", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,15 +1,13 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenDeadTree1;
|
import biomesoplenty.common.world.features.trees.WorldGenDeadTree1;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenWasteland extends BOPBiome
|
public class BiomeGenWasteland extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -19,10 +17,8 @@ public class BiomeGenWasteland extends BOPBiome
|
||||||
{
|
{
|
||||||
super(id);
|
super(id);
|
||||||
|
|
||||||
//TODO: setHeight()
|
|
||||||
this.setHeight(biomeHeight);
|
this.setHeight(biomeHeight);
|
||||||
this.setDisableRain();
|
this.setDisableRain();
|
||||||
//TODO: setColor()
|
|
||||||
this.setColor(5919808);
|
this.setColor(5919808);
|
||||||
this.setTemperatureRainfall(2.0F, 0.05F);
|
this.setTemperatureRainfall(2.0F, 0.05F);
|
||||||
|
|
||||||
|
@ -37,11 +33,13 @@ public class BiomeGenWasteland extends BOPBiome
|
||||||
this.theBiomeDecorator.grassPerChunk = 20;
|
this.theBiomeDecorator.grassPerChunk = 20;
|
||||||
|
|
||||||
//TODO: FEATURE customBiomeDecorator.poisonWaterPerChunk = 10;
|
//TODO: FEATURE customBiomeDecorator.poisonWaterPerChunk = 10;
|
||||||
this.bopWorldFeatures.waterLakesPerChunk = 2;
|
this.bopWorldFeatures.setFeature("waterLakesPerChunk", 2);
|
||||||
this.bopWorldFeatures.wasteland1PerChunk = 1;
|
this.bopWorldFeatures.setFeature("wasteland1PerChunk", 1);
|
||||||
this.bopWorldFeatures.wasteland2PerChunk = 1;
|
this.bopWorldFeatures.setFeature("wasteland2PerChunk", 1);
|
||||||
this.bopWorldFeatures.wasteland3PerChunk = 1;
|
this.bopWorldFeatures.setFeature("wasteland3PerChunk", 1);
|
||||||
this.bopWorldFeatures.wasteland4PerChunk = 1;
|
this.bopWorldFeatures.setFeature("wasteland4PerChunk", 1);
|
||||||
|
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("plants"), 0), 1D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -52,24 +50,12 @@ public class BiomeGenWasteland extends BOPBiome
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("plants"), 0), 1D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
//TODO: getBiomeGrassColor()
|
|
||||||
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
||||||
{
|
{
|
||||||
return 10330232;
|
return 10330232;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeFoliageColor()
|
|
||||||
public int getBiomeFoliageColor(int x, int y, int z)
|
public int getBiomeFoliageColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 10067541;
|
return 10067541;
|
||||||
|
|
|
@ -1,14 +1,5 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.entity.monster.EntitySlime;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
||||||
|
@ -16,6 +7,13 @@ import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
import biomesoplenty.common.world.features.WorldGenMoss;
|
import biomesoplenty.common.world.features.WorldGenMoss;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBOPSwampTree;
|
import biomesoplenty.common.world.features.trees.WorldGenBOPSwampTree;
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenBOPTaiga2;
|
import biomesoplenty.common.world.features.trees.WorldGenBOPTaiga2;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.entity.monster.EntitySlime;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BiomeGenWetland extends BOPBiome
|
public class BiomeGenWetland extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -25,9 +23,7 @@ public class BiomeGenWetland extends BOPBiome
|
||||||
{
|
{
|
||||||
super(id);
|
super(id);
|
||||||
|
|
||||||
//TODO: setHeight()
|
|
||||||
this.setHeight(biomeHeight);
|
this.setHeight(biomeHeight);
|
||||||
//TODO: setColor()
|
|
||||||
this.setColor(5215831);
|
this.setColor(5215831);
|
||||||
this.setTemperatureRainfall(0.8F, 0.9F);
|
this.setTemperatureRainfall(0.8F, 0.9F);
|
||||||
|
|
||||||
|
@ -48,21 +44,30 @@ public class BiomeGenWetland extends BOPBiome
|
||||||
this.theBiomeDecorator.sandPerChunk2 = -999;
|
this.theBiomeDecorator.sandPerChunk2 = -999;
|
||||||
this.theBiomeDecorator.waterlilyPerChunk = 4;
|
this.theBiomeDecorator.waterlilyPerChunk = 4;
|
||||||
|
|
||||||
this.bopWorldFeatures.toadstoolsPerChunk = 1;
|
this.bopWorldFeatures.setFeature("toadstoolsPerChunk", 1);
|
||||||
this.bopWorldFeatures.riverCanePerChunk = 15;
|
this.bopWorldFeatures.setFeature("riverCanePerChunk", 15);
|
||||||
this.bopWorldFeatures.mudPerChunk = 5;
|
this.bopWorldFeatures.setFeature("mudPerChunk", 5);
|
||||||
this.bopWorldFeatures.cattailsPerChunk = 20;
|
this.bopWorldFeatures.setFeature("cattailsPerChunk", 20);
|
||||||
this.bopWorldFeatures.highCattailsPerChunk = 10;
|
this.bopWorldFeatures.setFeature("highCattailsPerChunk", 10);
|
||||||
this.bopWorldFeatures.bopFlowersPerChunk = 6;
|
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 6);
|
||||||
this.bopWorldFeatures.blueMilksPerChunk = 1;
|
this.bopWorldFeatures.setFeature("blueMilksPerChunk", 1);
|
||||||
this.bopWorldFeatures.portobellosPerChunk = 1;
|
this.bopWorldFeatures.setFeature("portobellosPerChunk", 1);
|
||||||
this.bopWorldFeatures.berryBushesPerChunk = 1;
|
this.bopWorldFeatures.setFeature("berryBushesPerChunk", 1);
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 10;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 10);
|
||||||
this.bopWorldFeatures.waterReedsPerChunk = 8;
|
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 8);
|
||||||
this.bopWorldFeatures.koruPerChunk = 1;
|
this.bopWorldFeatures.setFeature("koruPerChunk", 1);
|
||||||
this.bopWorldFeatures.cloverPatchesPerChunk = 15;
|
this.bopWorldFeatures.setFeature("cloverPatchesPerChunk", 15);
|
||||||
this.bopWorldFeatures.seaweedPerChunk = 15;
|
this.bopWorldFeatures.setFeature("seaweedPerChunk", 15);
|
||||||
this.bopWorldFeatures.leafPilesPerChunk = 10;
|
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 10);
|
||||||
|
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 1), 10);
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 1), 6);
|
||||||
|
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPDoubleFlora(3), 0.75D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -73,31 +78,6 @@ public class BiomeGenWetland extends BOPBiome
|
||||||
new WorldGenBOPSwampTree(BOPBlockHelper.get("logs3"), BOPBlockHelper.get("colorizedLeaves2"), 1, 0, 6, 9, BOPBlockHelper.get("colorizedLeaves2"), 0);
|
new WorldGenBOPSwampTree(BOPBlockHelper.get("logs3"), BOPBlockHelper.get("colorizedLeaves2"), 1, 0, 6, 9, BOPBlockHelper.get("colorizedLeaves2"), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenBOPFlora, Integer> getWeightedWorldGenForBOPFlowers()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenBOPFlora, Integer> flowerMap = new HashMap();
|
|
||||||
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 1), 10);
|
|
||||||
flowerMap.put(new WorldGenBOPFlora(Blocks.red_flower, 1), 6);
|
|
||||||
|
|
||||||
return flowerMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
|
||||||
grassMap.put(new WorldGenBOPDoubleFlora(3), 0.75D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
||||||
|
@ -111,12 +91,10 @@ public class BiomeGenWetland extends BOPBiome
|
||||||
int y = random.nextInt(28) + 4;
|
int y = random.nextInt(28) + 4;
|
||||||
int z = chunkZ + random.nextInt(16);
|
int z = chunkZ + random.nextInt(16);
|
||||||
|
|
||||||
//TODO: getBlock()
|
|
||||||
Block block = world.getBlock(x, y, z);
|
Block block = world.getBlock(x, y, z);
|
||||||
|
|
||||||
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
||||||
{
|
{
|
||||||
//TODO: setBlock()
|
|
||||||
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 10, 2);
|
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 10, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -132,14 +110,12 @@ public class BiomeGenWetland extends BOPBiome
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeGrassColor()
|
|
||||||
public int getBiomeGrassColor(int x, int y, int z)
|
public int getBiomeGrassColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 5935967;
|
return 5935967;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getBiomeFoliageColor()
|
|
||||||
public int getBiomeFoliageColor(int x, int y, int z)
|
public int getBiomeFoliageColor(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return 5215831;
|
return 5215831;
|
||||||
|
|
|
@ -1,17 +1,14 @@
|
||||||
package biomesoplenty.common.biomes;
|
package biomesoplenty.common.biomes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import java.util.Random;
|
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
||||||
|
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import java.util.Random;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
|
||||||
|
|
||||||
public class BiomeGenWoodland extends BOPBiome
|
public class BiomeGenWoodland extends BOPBiome
|
||||||
{
|
{
|
||||||
|
@ -21,9 +18,7 @@ public class BiomeGenWoodland extends BOPBiome
|
||||||
{
|
{
|
||||||
super(id);
|
super(id);
|
||||||
|
|
||||||
//TODO: setHeight()
|
|
||||||
this.setHeight(biomeHeight);
|
this.setHeight(biomeHeight);
|
||||||
//TODO: setColor()
|
|
||||||
this.setColor(8694061);
|
this.setColor(8694061);
|
||||||
this.setTemperatureRainfall(1.7F, 0.2F);
|
this.setTemperatureRainfall(1.7F, 0.2F);
|
||||||
|
|
||||||
|
@ -31,14 +26,20 @@ public class BiomeGenWoodland extends BOPBiome
|
||||||
this.theBiomeDecorator.grassPerChunk = 7;
|
this.theBiomeDecorator.grassPerChunk = 7;
|
||||||
this.theBiomeDecorator.mushroomsPerChunk = 4;
|
this.theBiomeDecorator.mushroomsPerChunk = 4;
|
||||||
|
|
||||||
this.bopWorldFeatures.bopFlowersPerChunk = 5;
|
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 5);
|
||||||
this.bopWorldFeatures.toadstoolsPerChunk = 3;
|
this.bopWorldFeatures.setFeature("toadstoolsPerChunk", 3);
|
||||||
this.bopWorldFeatures.shrubsPerChunk = 20;
|
this.bopWorldFeatures.setFeature("shrubsPerChunk", 20);
|
||||||
this.bopWorldFeatures.waterReedsPerChunk = 2;
|
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 2);
|
||||||
this.bopWorldFeatures.cloverPatchesPerChunk = 10;
|
this.bopWorldFeatures.setFeature("cloverPatchesPerChunk", 10);
|
||||||
this.bopWorldFeatures.leafPilesPerChunk = 10;
|
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 10);
|
||||||
this.bopWorldFeatures.deadLeafPilesPerChunk = 10;
|
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 10);
|
||||||
this.bopWorldFeatures.logsPerChunk = 10;
|
this.bopWorldFeatures.setFeature("logsPerChunk", 10);
|
||||||
|
|
||||||
|
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(4, 5), 6);
|
||||||
|
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||||
|
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -49,28 +50,6 @@ public class BiomeGenWoodland extends BOPBiome
|
||||||
return random.nextInt(10) == 0 ? worldGeneratorBigTree : worldGeneratorTrees;
|
return random.nextInt(10) == 0 ? worldGeneratorBigTree : worldGeneratorTrees;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenBOPFlora, Integer> getWeightedWorldGenForBOPFlowers()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenBOPFlora, Integer> flowerMap = new HashMap();
|
|
||||||
|
|
||||||
flowerMap.put(new WorldGenBOPDoubleFlora(4, 5), 6);
|
|
||||||
|
|
||||||
return flowerMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
|
||||||
{
|
|
||||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
|
||||||
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
|
||||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
|
||||||
|
|
||||||
return grassMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
||||||
{
|
{
|
||||||
|
@ -83,12 +62,10 @@ public class BiomeGenWoodland extends BOPBiome
|
||||||
int y = random.nextInt(28) + 4;
|
int y = random.nextInt(28) + 4;
|
||||||
int z = chunkZ + random.nextInt(16);
|
int z = chunkZ + random.nextInt(16);
|
||||||
|
|
||||||
//TODO: getBlock()
|
|
||||||
Block block = world.getBlock(x, y, z);
|
Block block = world.getBlock(x, y, z);
|
||||||
|
|
||||||
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
||||||
{
|
{
|
||||||
//TODO: setBlock()
|
|
||||||
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 0, 2);
|
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 0, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,117 +0,0 @@
|
||||||
package biomesoplenty.common.biomes.promisedland;
|
|
||||||
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
|
||||||
import biomesoplenty.common.biomes.BOPBiome;
|
|
||||||
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
|
||||||
import biomesoplenty.common.world.decoration.BOPBiomeDecorator;
|
|
||||||
import biomesoplenty.common.world.features.WorldGenWaterSpring;
|
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenPromisedTree;
|
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenPromisedTree2;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
//import worldcore.interfaces.IWCFog;
|
|
||||||
|
|
||||||
public class BiomeGenPromisedLandForest extends BOPBiome //implements IWCFog
|
|
||||||
{
|
|
||||||
private WorldGenerator theWorldGenerator;
|
|
||||||
private BOPBiomeDecorator customBiomeDecorator;
|
|
||||||
|
|
||||||
public BiomeGenPromisedLandForest(int par1)
|
|
||||||
{
|
|
||||||
super(par1);
|
|
||||||
theBiomeDecorator = new BOPBiomeDecorator();
|
|
||||||
customBiomeDecorator = (BOPBiomeDecorator)theBiomeDecorator;
|
|
||||||
topBlock = BOPBlockHelper.get("grass");
|
|
||||||
fillerBlock = BOPBlockHelper.get("holyDirt");
|
|
||||||
customBiomeDecorator.treesPerChunk = 10;
|
|
||||||
customBiomeDecorator.grassPerChunk = 0;
|
|
||||||
//this.bopWorldFeatures.holyTallGrassPerChunk = 100;
|
|
||||||
//this.bopWorldFeatures.promisedWillowPerChunk = 40;
|
|
||||||
//this.bopWorldFeatures.pinkFlowersPerChunk = 12;
|
|
||||||
//this.bopWorldFeatures.rainbowflowersPerChunk = 10;
|
|
||||||
this.bopWorldFeatures.blueMilksPerChunk = 5;
|
|
||||||
customBiomeDecorator.generateLakes = false;
|
|
||||||
this.bopWorldFeatures.waterPoolsPerChunk = 0;
|
|
||||||
//this.bopWorldFeatures.hotSpringsPerChunk = 5;
|
|
||||||
this.bopWorldFeatures.waterLakesPerChunk = 10;
|
|
||||||
//this.bopWorldFeatures.crystalsPerChunk = 25;
|
|
||||||
//this.bopWorldFeatures.crystals2PerChunk = 50;
|
|
||||||
//this.bopWorldFeatures.cloudsPerChunk = 1;
|
|
||||||
spawnableCreatureList.clear();
|
|
||||||
spawnableWaterCreatureList.clear();
|
|
||||||
spawnableMonsterList.clear();
|
|
||||||
spawnableCaveCreatureList.clear();
|
|
||||||
this.bopWorldFeatures.generatePumpkins = false;
|
|
||||||
//this.bopWorldFeatures.generateMossySkystone = true;
|
|
||||||
//this.bopWorldFeatures.generateUndergroundLakes = false;
|
|
||||||
theWorldGenerator = new WorldGenWaterSpring(Blocks.water, 8);
|
|
||||||
/*this.spawnableMonsterList.add(new SpawnListEntry(EntityCow.class, 6, 1, 4));*/
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets a WorldGen appropriate for this biome.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
//TODO: getRandomWorldGenForTrees()
|
|
||||||
public WorldGenAbstractTree func_150567_a(Random random)
|
|
||||||
{
|
|
||||||
return random.nextInt(8) == 0 ? new WorldGenPromisedTree2(false) : new WorldGenPromisedTree(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getBiomeGrassColor(int x, int y, int z)
|
|
||||||
{
|
|
||||||
return 7925125;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Provides the basic foliage color based on the biome temperature and rainfall
|
|
||||||
*/
|
|
||||||
//@Override
|
|
||||||
public int getBiomeFoliageColor()
|
|
||||||
{
|
|
||||||
return 7925125;
|
|
||||||
}
|
|
||||||
|
|
||||||
//@Override
|
|
||||||
public int getFogColour()
|
|
||||||
{
|
|
||||||
return 16754234;
|
|
||||||
}
|
|
||||||
|
|
||||||
//@Override
|
|
||||||
public float getFogCloseness()
|
|
||||||
{
|
|
||||||
return 1.0F;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void decorate(World par1World, Random par2Random, int par3, int par4)
|
|
||||||
{
|
|
||||||
super.decorate(par1World, par2Random, par3, par4);
|
|
||||||
int var5 = 100;
|
|
||||||
int var6;
|
|
||||||
int var7;
|
|
||||||
int var8;
|
|
||||||
|
|
||||||
for (var5 = 0; var5 < 10; ++var5)
|
|
||||||
{
|
|
||||||
var6 = par3 + par2Random.nextInt(16);
|
|
||||||
var7 = par2Random.nextInt(60);
|
|
||||||
var8 = par4 + par2Random.nextInt(16);
|
|
||||||
theWorldGenerator.generate(par1World, par2Random, var6, var7, var8);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getSkyColorByTemp(float temperature)
|
|
||||||
{
|
|
||||||
if (BOPConfigurationMisc.skyColors) return BOPConfigurationMisc.promisedLandSkyColor;
|
|
||||||
else return super.getSkyColorByTemp(temperature);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,141 +0,0 @@
|
||||||
package biomesoplenty.common.biomes.promisedland;
|
|
||||||
|
|
||||||
import java.awt.Color;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//import worldcore.interfaces.IWCFog;
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
|
||||||
import biomesoplenty.common.biomes.BOPBiome;
|
|
||||||
import biomesoplenty.common.world.decoration.BOPBiomeDecorator;
|
|
||||||
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
|
||||||
import biomesoplenty.common.world.features.WorldGenWaterSpring;
|
|
||||||
|
|
||||||
public class BiomeGenPromisedLandPlains extends BOPBiome //implements IWCFog
|
|
||||||
{
|
|
||||||
private WorldGenerator theWorldGenerator;
|
|
||||||
private BOPBiomeDecorator customBiomeDecorator;
|
|
||||||
|
|
||||||
public BiomeGenPromisedLandPlains(int par1)
|
|
||||||
{
|
|
||||||
super(par1);
|
|
||||||
theBiomeDecorator = new BOPBiomeDecorator();
|
|
||||||
customBiomeDecorator = (BOPBiomeDecorator)theBiomeDecorator;
|
|
||||||
topBlock = BOPBlockHelper.get("grass");
|
|
||||||
fillerBlock = BOPBlockHelper.get("holyDirt");
|
|
||||||
customBiomeDecorator.treesPerChunk = 0;
|
|
||||||
customBiomeDecorator.grassPerChunk = 0;
|
|
||||||
//customBiomeDecorator.holyTallGrassPerChunk = 999;
|
|
||||||
//customBiomeDecorator.promisedWillowPerChunk = 80;
|
|
||||||
//customBiomeDecorator.rainbowflowersPerChunk = 20;
|
|
||||||
customBiomeDecorator.generateLakes = false;
|
|
||||||
//customBiomeDecorator.pondsPerChunk = -100;
|
|
||||||
//customBiomeDecorator.hotSpringsPerChunk = 2;
|
|
||||||
//customBiomeDecorator.waterLakesPerChunk = 3;
|
|
||||||
//customBiomeDecorator.crystalsPerChunk = 25;
|
|
||||||
//customBiomeDecorator.crystals2PerChunk = 50;
|
|
||||||
//customBiomeDecorator.cloudsPerChunk = 1;
|
|
||||||
spawnableCreatureList.clear();
|
|
||||||
spawnableWaterCreatureList.clear();
|
|
||||||
spawnableMonsterList.clear();
|
|
||||||
spawnableCaveCreatureList.clear();
|
|
||||||
//customBiomeDecorator.generatePumpkins = false;
|
|
||||||
//customBiomeDecorator.generateMossySkystone = true;
|
|
||||||
//customBiomeDecorator.generateUndergroundLakes = false;
|
|
||||||
theWorldGenerator = new WorldGenWaterSpring(Blocks.water, 8);
|
|
||||||
|
|
||||||
/*if (Loader.isModLoaded("TwilightForest"))
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
this.spawnableMonsterList.add(new SpawnListEntry(Class.forName("twilightforest.entity.passive.EntityTFBird"), 2, 1, 3));
|
|
||||||
this.spawnableMonsterList.add(new SpawnListEntry(Class.forName("twilightforest.entity.passive.EntityTFBunny"), 4, 1, 3));
|
|
||||||
this.spawnableMonsterList.add(new SpawnListEntry(Class.forName("twilightforest.entity.passive.EntityTFSquirrel"), 4, 1, 2));
|
|
||||||
} catch (ClassNotFoundException e) {
|
|
||||||
System.out.println("[BiomesOPlenty] There was an error while integrating Twilight Forest with Biomes O' Plenty!");
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
//TODO: getBiomeGrassColor()
|
|
||||||
public int getBiomeGrassColor(int x, int y, int z)
|
|
||||||
{
|
|
||||||
return 7925125;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Provides the basic foliage color based on the biome temperature and rainfall
|
|
||||||
*/
|
|
||||||
//@Override
|
|
||||||
public int getBiomeFoliageColor()
|
|
||||||
{
|
|
||||||
return 7925125;
|
|
||||||
}
|
|
||||||
|
|
||||||
//@Override
|
|
||||||
public int getFogColour()
|
|
||||||
{
|
|
||||||
return 16754234;
|
|
||||||
}
|
|
||||||
|
|
||||||
//@Override
|
|
||||||
public float getFogCloseness()
|
|
||||||
{
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return 1.0F;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void decorate(World par1World, Random par2Random, int par3, int par4)
|
|
||||||
{
|
|
||||||
super.decorate(par1World, par2Random, par3, par4);
|
|
||||||
int var5 = 100;
|
|
||||||
int var6;
|
|
||||||
int var7;
|
|
||||||
int var8;
|
|
||||||
|
|
||||||
for (var5 = 0; var5 < 10; ++var5)
|
|
||||||
{
|
|
||||||
var6 = par3 + par2Random.nextInt(16);
|
|
||||||
var7 = par2Random.nextInt(60);
|
|
||||||
var8 = par4 + par2Random.nextInt(16);
|
|
||||||
theWorldGenerator.generate(par1World, par2Random, var6, var7, var8);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* takes temperature, returns color
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int getSkyColorByTemp(float par1)
|
|
||||||
{
|
|
||||||
if (BOPConfigurationMisc.skyColors)
|
|
||||||
return BOPConfigurationMisc.promisedLandSkyColor;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
par1 /= 3.0F;
|
|
||||||
|
|
||||||
if (par1 < -1.0F)
|
|
||||||
{
|
|
||||||
par1 = -1.0F;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (par1 > 1.0F)
|
|
||||||
{
|
|
||||||
par1 = 1.0F;
|
|
||||||
}
|
|
||||||
|
|
||||||
return Color.getHSBColor(0.62222224F - par1 * 0.05F, 0.5F + par1 * 0.1F, 1.0F).getRGB();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,156 +0,0 @@
|
||||||
package biomesoplenty.common.biomes.promisedland;
|
|
||||||
|
|
||||||
import java.awt.Color;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//import worldcore.interfaces.IWCFog;
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
|
||||||
import biomesoplenty.common.biomes.BOPBiome;
|
|
||||||
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
|
||||||
import biomesoplenty.common.world.decoration.BOPBiomeDecorator;
|
|
||||||
import biomesoplenty.common.world.features.WorldGenWaterSpring;
|
|
||||||
import biomesoplenty.common.world.features.trees.WorldGenPromisedWillowTree;
|
|
||||||
|
|
||||||
public class BiomeGenPromisedLandSwamp extends BOPBiome //implements IWCFog
|
|
||||||
{
|
|
||||||
private WorldGenerator theWorldGenerator;
|
|
||||||
private BOPBiomeDecorator customBiomeDecorator;
|
|
||||||
|
|
||||||
public BiomeGenPromisedLandSwamp(int par1)
|
|
||||||
{
|
|
||||||
super(par1);
|
|
||||||
theBiomeDecorator = new BOPBiomeDecorator();
|
|
||||||
customBiomeDecorator = (BOPBiomeDecorator)theBiomeDecorator;
|
|
||||||
topBlock = BOPBlockHelper.get("grass");
|
|
||||||
fillerBlock = BOPBlockHelper.get("holyDirt");
|
|
||||||
customBiomeDecorator.treesPerChunk = 12;
|
|
||||||
customBiomeDecorator.grassPerChunk = 0;
|
|
||||||
//customBiomeDecorator.holyTallGrassPerChunk = 100;
|
|
||||||
//customBiomeDecorator.promisedWillowPerChunk = 40;
|
|
||||||
//customBiomeDecorator.pinkFlowersPerChunk = 6;
|
|
||||||
//customBiomeDecorator.rainbowflowersPerChunk = 5;
|
|
||||||
//customBiomeDecorator.blueMilksPerChunk = 15;
|
|
||||||
//customBiomeDecorator.toadstoolsPerChunk = 10;
|
|
||||||
//customBiomeDecorator.portobellosPerChunk = 5;
|
|
||||||
customBiomeDecorator.generateLakes = false;
|
|
||||||
//customBiomeDecorator.pondsPerChunk = -100;
|
|
||||||
//customBiomeDecorator.hotSpringsPerChunk = 5;
|
|
||||||
//customBiomeDecorator.waterLakesPerChunk = 15;
|
|
||||||
//customBiomeDecorator.crystalsPerChunk = 25;
|
|
||||||
//customBiomeDecorator.crystals2PerChunk = 50;
|
|
||||||
//customBiomeDecorator.cloudsPerChunk = 1;
|
|
||||||
spawnableCreatureList.clear();
|
|
||||||
spawnableWaterCreatureList.clear();
|
|
||||||
spawnableMonsterList.clear();
|
|
||||||
spawnableCaveCreatureList.clear();
|
|
||||||
//customBiomeDecorator.generatePumpkins = false;
|
|
||||||
//customBiomeDecorator.generateMossySkystone = true;
|
|
||||||
//customBiomeDecorator.generateUndergroundLakes = false;
|
|
||||||
theWorldGenerator = new WorldGenWaterSpring(Blocks.water, 8);
|
|
||||||
/*this.spawnableMonsterList.add(new SpawnListEntry(EntityPig.class, 4, 1, 4));
|
|
||||||
|
|
||||||
if (Loader.isModLoaded("TwilightForest"))
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
this.spawnableMonsterList.add(new SpawnListEntry(Class.forName("twilightforest.entity.passive.EntityTFBird"), 2, 1, 3));
|
|
||||||
this.spawnableMonsterList.add(new SpawnListEntry(Class.forName("twilightforest.entity.passive.EntityTFRaven"), 1, 1, 2));
|
|
||||||
} catch (ClassNotFoundException e) {
|
|
||||||
System.out.println("[BiomesOPlenty] There was an error while integrating Twilight Forest with Biomes O' Plenty!");
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets a WorldGen appropriate for this biome.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
//TODO: getRandomWorldGenForTrees()
|
|
||||||
public WorldGenAbstractTree func_150567_a(Random random)
|
|
||||||
{
|
|
||||||
return new WorldGenPromisedWillowTree(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
//TODO: getBiomeGrassColor()
|
|
||||||
public int getBiomeGrassColor(int x, int y, int z)
|
|
||||||
{
|
|
||||||
return 7925125;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Provides the basic foliage color based on the biome temperature and rainfall
|
|
||||||
*/
|
|
||||||
//@Override
|
|
||||||
public int getBiomeFoliageColor()
|
|
||||||
{
|
|
||||||
return 7925125;
|
|
||||||
}
|
|
||||||
|
|
||||||
//@Override
|
|
||||||
public int getFogColour()
|
|
||||||
{
|
|
||||||
return 16754234;
|
|
||||||
}
|
|
||||||
|
|
||||||
//@Override
|
|
||||||
public float getFogCloseness()
|
|
||||||
{
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return 1.0F;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void decorate(World par1World, Random par2Random, int par3, int par4)
|
|
||||||
{
|
|
||||||
super.decorate(par1World, par2Random, par3, par4);
|
|
||||||
int var5 = 100;
|
|
||||||
int var6;
|
|
||||||
int var7;
|
|
||||||
int var8;
|
|
||||||
|
|
||||||
for (var5 = 0; var5 < 10; ++var5)
|
|
||||||
{
|
|
||||||
var6 = par3 + par2Random.nextInt(16);
|
|
||||||
var7 = par2Random.nextInt(60);
|
|
||||||
var8 = par4 + par2Random.nextInt(16);
|
|
||||||
theWorldGenerator.generate(par1World, par2Random, var6, var7, var8);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* takes temperature, returns color
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int getSkyColorByTemp(float par1)
|
|
||||||
{
|
|
||||||
if (BOPConfigurationMisc.skyColors)
|
|
||||||
return BOPConfigurationMisc.promisedLandSkyColor;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
par1 /= 3.0F;
|
|
||||||
|
|
||||||
if (par1 < -1.0F)
|
|
||||||
{
|
|
||||||
par1 = -1.0F;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (par1 > 1.0F)
|
|
||||||
{
|
|
||||||
par1 = 1.0F;
|
|
||||||
}
|
|
||||||
|
|
||||||
return Color.getHSBColor(0.62222224F - par1 * 0.05F, 0.5F + par1 * 0.1F, 1.0F).getRGB();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,90 +0,0 @@
|
||||||
package biomesoplenty.common.blocks;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
||||||
import net.minecraft.entity.Entity;
|
|
||||||
import net.minecraft.entity.player.EntityPlayerMP;
|
|
||||||
import net.minecraft.util.AxisAlignedBB;
|
|
||||||
import net.minecraft.world.IBlockAccess;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import biomesoplenty.common.configuration.BOPConfigurationIDs;
|
|
||||||
import biomesoplenty.common.helpers.TeleporterPromised;
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
|
|
||||||
public class BlockPromisedPortal extends Block
|
|
||||||
{
|
|
||||||
public BlockPromisedPortal()
|
|
||||||
{
|
|
||||||
//TODO: Material.portal
|
|
||||||
super(Material.portal);
|
|
||||||
|
|
||||||
//TODO: this.setUnbreakable()
|
|
||||||
this.setBlockUnbreakable();
|
|
||||||
//TODO: this.setResistance
|
|
||||||
this.setResistance(6000000.0F);
|
|
||||||
|
|
||||||
//TODO: this.setLightValue
|
|
||||||
this.setLightLevel(1.0F);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
//TODO: registerIcons()
|
|
||||||
public void registerBlockIcons(IIconRegister iconRegister)
|
|
||||||
{
|
|
||||||
//TODO: blockIcon
|
|
||||||
this.blockIcon = iconRegister.registerIcon("biomesoplenty:portal");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
//TODO: getRenderBlockPass()
|
|
||||||
public int getRenderBlockPass()
|
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
//TODO shouldSideBeRendered
|
|
||||||
public boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int side)
|
|
||||||
{
|
|
||||||
//TODO: shouldSideBeRendered()
|
|
||||||
return super.shouldSideBeRendered(world, x, y, z, 1 - side);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
//TODO: getCollisionBoundingBoxFromPool
|
|
||||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
//TODO: isOpaqueCube()
|
|
||||||
public boolean isOpaqueCube()
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
//TODO: onEntityCollidedWithBlock()
|
|
||||||
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity)
|
|
||||||
{
|
|
||||||
if (entity.ridingEntity == null && entity.riddenByEntity == null)
|
|
||||||
{
|
|
||||||
if (entity instanceof EntityPlayerMP)
|
|
||||||
{
|
|
||||||
EntityPlayerMP thePlayer = (EntityPlayerMP) entity;
|
|
||||||
if (entity.dimension != BOPConfigurationIDs.promisedLandDimID)
|
|
||||||
{
|
|
||||||
thePlayer.mcServer.getConfigurationManager().transferPlayerToDimension(thePlayer, BOPConfigurationIDs.promisedLandDimID, new TeleporterPromised(thePlayer.mcServer.worldServerForDimension(BOPConfigurationIDs.promisedLandDimID)));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
thePlayer.mcServer.getConfigurationManager().transferPlayerToDimension(thePlayer, 0, new TeleporterPromised(thePlayer.mcServer.worldServerForDimension(0)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,22 +1,18 @@
|
||||||
package biomesoplenty.common.configuration;
|
package biomesoplenty.common.configuration;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
|
||||||
import net.minecraftforge.common.config.Configuration;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.text.WordUtils;
|
|
||||||
import org.apache.logging.log4j.Level;
|
|
||||||
|
|
||||||
import biomesoplenty.api.BOPBiomeHelper;
|
import biomesoplenty.api.BOPBiomeHelper;
|
||||||
import biomesoplenty.api.BOPBiomeHelper.BOPBiomeEntry;
|
import biomesoplenty.api.BOPBiomeHelper.BOPBiomeEntry;
|
||||||
import biomesoplenty.api.BOPBiomeHelper.TemperatureType;
|
import biomesoplenty.api.BOPBiomeHelper.TemperatureType;
|
||||||
import biomesoplenty.common.core.BOPBiomes;
|
import biomesoplenty.common.core.BOPWorld;
|
||||||
import biomesoplenty.common.world.layer.GenLayerBiomeBOP;
|
|
||||||
import biomesoplenty.common.world.layer.hell.BiomeLayerHellBiomes;
|
import biomesoplenty.common.world.layer.hell.BiomeLayerHellBiomes;
|
||||||
import cpw.mods.fml.common.FMLCommonHandler;
|
|
||||||
import cpw.mods.fml.common.FMLLog;
|
import cpw.mods.fml.common.FMLLog;
|
||||||
|
import net.minecraft.world.biome.BiomeGenBase;
|
||||||
|
import net.minecraftforge.common.config.Configuration;
|
||||||
|
import org.apache.commons.lang3.text.WordUtils;
|
||||||
|
import org.apache.logging.log4j.Level;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class BOPConfigurationBiomeGen
|
public class BOPConfigurationBiomeGen
|
||||||
{
|
{
|
||||||
|
@ -69,18 +65,18 @@ public class BOPConfigurationBiomeGen
|
||||||
|
|
||||||
if (config.get("Overworld Biomes To Generate (There must be at least one from each category)", name + " (" + WordUtils.capitalize(entry.temperatureType.toString().toLowerCase()) + ")", !disabledBiomes.contains(convertedName)).getBoolean(!disabledBiomes.contains(convertedName)))
|
if (config.get("Overworld Biomes To Generate (There must be at least one from each category)", name + " (" + WordUtils.capitalize(entry.temperatureType.toString().toLowerCase()) + ")", !disabledBiomes.contains(convertedName)).getBoolean(!disabledBiomes.contains(convertedName)))
|
||||||
{
|
{
|
||||||
if (BOPBiomes.onlyBiome != null ? entry == BOPBiomes.onlyBiome : true)
|
if (BOPWorld.onlyBiome != null ? entry == BOPWorld.onlyBiome : true)
|
||||||
{
|
{
|
||||||
entry.addToCorrespondingTemperatureTypeList();
|
entry.addToCorrespondingTemperatureTypeList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BOPBiomes.onlyBiome != null)
|
if (BOPWorld.onlyBiome != null)
|
||||||
{
|
{
|
||||||
for (TemperatureType temperatureType : BOPBiomeHelper.TemperatureType.values())
|
for (TemperatureType temperatureType : BOPBiomeHelper.TemperatureType.values())
|
||||||
{
|
{
|
||||||
BOPBiomeHelper.getCorrespondingTemperatureTypeList(temperatureType).add(BOPBiomes.onlyBiome);
|
BOPBiomeHelper.getCorrespondingTemperatureTypeList(temperatureType).add(BOPWorld.onlyBiome);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,20 +1,15 @@
|
||||||
package biomesoplenty.common.configuration;
|
package biomesoplenty.common.configuration;
|
||||||
|
|
||||||
import java.io.File;
|
import cpw.mods.fml.common.FMLLog;
|
||||||
|
|
||||||
import net.minecraftforge.common.config.Configuration;
|
import net.minecraftforge.common.config.Configuration;
|
||||||
|
|
||||||
import org.apache.logging.log4j.Level;
|
import org.apache.logging.log4j.Level;
|
||||||
|
|
||||||
import cpw.mods.fml.common.FMLCommonHandler;
|
import java.io.File;
|
||||||
import cpw.mods.fml.common.FMLLog;
|
|
||||||
|
|
||||||
public class BOPConfigurationIDs
|
public class BOPConfigurationIDs
|
||||||
{
|
{
|
||||||
public static Configuration config;
|
public static Configuration config;
|
||||||
|
|
||||||
public static int promisedLandDimID;
|
|
||||||
|
|
||||||
//Biome IDs
|
//Biome IDs
|
||||||
public static int alpsID;
|
public static int alpsID;
|
||||||
public static int alpsForestID;
|
public static int alpsForestID;
|
||||||
|
@ -97,11 +92,6 @@ public class BOPConfigurationIDs
|
||||||
public static int polarID;
|
public static int polarID;
|
||||||
public static int prairieID;
|
public static int prairieID;
|
||||||
|
|
||||||
public static int wonderousWoodsID;
|
|
||||||
public static int majesticMeadowID;
|
|
||||||
public static int promisedLandShrubID;
|
|
||||||
public static int blessedBogID;
|
|
||||||
|
|
||||||
public static int quagmireID;
|
public static int quagmireID;
|
||||||
public static int rainforestID;
|
public static int rainforestID;
|
||||||
public static int redwoodForestID;
|
public static int redwoodForestID;
|
||||||
|
@ -153,8 +143,6 @@ public class BOPConfigurationIDs
|
||||||
{
|
{
|
||||||
config.load();
|
config.load();
|
||||||
|
|
||||||
promisedLandDimID = config.get("Dimension Settings", "Promised Land Dimension ID", 20, null).getInt();
|
|
||||||
|
|
||||||
//Mob IDs
|
//Mob IDs
|
||||||
jungleSpiderID = config.get("Mob IDs", "Jungle Spider ID", 101, null).getInt();
|
jungleSpiderID = config.get("Mob IDs", "Jungle Spider ID", 101, null).getInt();
|
||||||
rosesterID = config.get("Mob IDs", "Rosester ID", 102, null).getInt();
|
rosesterID = config.get("Mob IDs", "Rosester ID", 102, null).getInt();
|
||||||
|
@ -171,7 +159,6 @@ public class BOPConfigurationIDs
|
||||||
|
|
||||||
//23-79 ExtraBiomesXL
|
//23-79 ExtraBiomesXL
|
||||||
|
|
||||||
promisedLandShrubID = config.get("Biome IDs", "Sublime Shrubland (Promised Land) ID", 53).getInt();
|
|
||||||
mysticGroveThinID = config.get("Biome IDs", "Thinned Mystic Grove (Sub-Biome) ID", 54).getInt();
|
mysticGroveThinID = config.get("Biome IDs", "Thinned Mystic Grove (Sub-Biome) ID", 54).getInt();
|
||||||
netherBloodID = config.get("Biome IDs", "Bloody Heap (Nether) ID", 55).getInt();
|
netherBloodID = config.get("Biome IDs", "Bloody Heap (Nether) ID", 55).getInt();
|
||||||
lavenderFieldsID = config.get("Biome IDs", "Lavender Fields ID", 56).getInt();
|
lavenderFieldsID = config.get("Biome IDs", "Lavender Fields ID", 56).getInt();
|
||||||
|
@ -198,10 +185,6 @@ public class BOPConfigurationIDs
|
||||||
beachGravelID = config.get("Biome IDs", "Gravel Beach ID", 75).getInt();
|
beachGravelID = config.get("Biome IDs", "Gravel Beach ID", 75).getInt();
|
||||||
beachOvergrownID = config.get("Biome IDs", "Overgrown Beach ID", 76).getInt();
|
beachOvergrownID = config.get("Biome IDs", "Overgrown Beach ID", 76).getInt();
|
||||||
|
|
||||||
wonderousWoodsID = config.get("Biome IDs", "Wonderous Woods (Promised Land) ID", 77).getInt();
|
|
||||||
majesticMeadowID = config.get("Biome IDs", "Majestic Meadow (Promised Land) ID", 78).getInt();
|
|
||||||
blessedBogID = config.get("Biome IDs", "Blessed Bog (Promised Land) ID", 79).getInt();
|
|
||||||
|
|
||||||
netherBaseID = config.get("Biome IDs", "Nether Base (Nether) ID", 80).getInt();
|
netherBaseID = config.get("Biome IDs", "Nether Base (Nether) ID", 80).getInt();
|
||||||
netherGardenID = config.get("Biome IDs", "Undergarden (Nether) ID", 81).getInt();
|
netherGardenID = config.get("Biome IDs", "Undergarden (Nether) ID", 81).getInt();
|
||||||
netherDesertID = config.get("Biome IDs", "Corrupted Sands (Nether) ID", 82).getInt();
|
netherDesertID = config.get("Biome IDs", "Corrupted Sands (Nether) ID", 82).getInt();
|
||||||
|
|
|
@ -1,17 +1,12 @@
|
||||||
package biomesoplenty.common.configuration;
|
package biomesoplenty.common.configuration;
|
||||||
|
|
||||||
import java.io.File;
|
import biomesoplenty.common.world.generation.WorldGenFieldAssociation;
|
||||||
import java.util.ArrayList;
|
import cpw.mods.fml.common.FMLLog;
|
||||||
import java.util.Map.Entry;
|
|
||||||
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import net.minecraftforge.common.config.Configuration;
|
import net.minecraftforge.common.config.Configuration;
|
||||||
|
|
||||||
import org.apache.logging.log4j.Level;
|
import org.apache.logging.log4j.Level;
|
||||||
|
|
||||||
import biomesoplenty.common.world.generation.WorldGenFieldAssociation;
|
import java.io.File;
|
||||||
import cpw.mods.fml.common.FMLCommonHandler;
|
import java.util.Map.Entry;
|
||||||
import cpw.mods.fml.common.FMLLog;
|
|
||||||
|
|
||||||
public class BOPConfigurationWorldFeatures
|
public class BOPConfigurationWorldFeatures
|
||||||
{
|
{
|
||||||
|
@ -25,7 +20,7 @@ public class BOPConfigurationWorldFeatures
|
||||||
{
|
{
|
||||||
config.load();
|
config.load();
|
||||||
|
|
||||||
for (Entry<String, WorldGenerator> entry : WorldGenFieldAssociation.worldGeneratorMap.entrySet())
|
for (Entry<String, WorldGenFieldAssociation.WorldFeature> entry : WorldGenFieldAssociation.featureMap.entrySet())
|
||||||
{
|
{
|
||||||
String key = entry.getKey();
|
String key = entry.getKey();
|
||||||
|
|
||||||
|
@ -35,7 +30,7 @@ public class BOPConfigurationWorldFeatures
|
||||||
|
|
||||||
if (!featureEnabled)
|
if (!featureEnabled)
|
||||||
{
|
{
|
||||||
WorldGenFieldAssociation.worldGeneratorMap.remove(key);
|
WorldGenFieldAssociation.featureMap.remove(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,16 +45,15 @@ public class BOPBlocks
|
||||||
registerBlock(new BlockBOPLeaves(LeafCategory.CAT4).setBlockName("leaves4"), ItemBlockLeaves.class);
|
registerBlock(new BlockBOPLeaves(LeafCategory.CAT4).setBlockName("leaves4"), ItemBlockLeaves.class);
|
||||||
registerBlock(new BlockBOPFoliage().setBlockName("foliage"), ItemBlockFoliage.class);
|
registerBlock(new BlockBOPFoliage().setBlockName("foliage"), ItemBlockFoliage.class);
|
||||||
registerBlock(new BlockTurnip().setBlockName("turnip"));
|
registerBlock(new BlockTurnip().setBlockName("turnip"));
|
||||||
//TODO: rock
|
|
||||||
registerBlock(new BlockBOPGeneric(Material.rock, BlockType.ASH_STONE).setBlockName("ashStone"));
|
registerBlock(new BlockBOPGeneric(Material.rock, BlockType.ASH_STONE).setBlockName("ashStone"));
|
||||||
//TODO: rock
|
|
||||||
registerBlock(new BlockBOPGeneric(Material.rock, BlockType.HARD_ICE).setBlockName("hardIce"));
|
registerBlock(new BlockBOPGeneric(Material.rock, BlockType.HARD_ICE).setBlockName("hardIce"));
|
||||||
|
|
||||||
registerBlock(new BlockBOPAppleLeaves().setBlockName("appleLeaves"), ItemBlockAppleLeaves.class);
|
registerBlock(new BlockBOPAppleLeaves().setBlockName("appleLeaves"), ItemBlockAppleLeaves.class);
|
||||||
registerBlock(new BlockBOPPersimmonLeaves().setBlockName("persimmonLeaves"), ItemBlockPersimmonLeaves.class);
|
registerBlock(new BlockBOPPersimmonLeaves().setBlockName("persimmonLeaves"), ItemBlockPersimmonLeaves.class);
|
||||||
|
|
||||||
registerBlock(new BlockBamboo().setBlockName("bamboo"), ItemBlockBamboo.class);
|
registerBlock(new BlockBamboo().setBlockName("bamboo"), ItemBlockBamboo.class);
|
||||||
//TODO: rock
|
|
||||||
registerBlock(new BlockBOPGeneric(Material.rock, BlockType.MUD_BRICK).setBlockName("mudBricks"));
|
registerBlock(new BlockBOPGeneric(Material.rock, BlockType.MUD_BRICK).setBlockName("mudBricks"));
|
||||||
|
|
||||||
registerBlock(new BlockOriginGrass().setBlockName("originGrass"));
|
registerBlock(new BlockOriginGrass().setBlockName("originGrass"));
|
||||||
|
@ -74,24 +73,18 @@ public class BOPBlocks
|
||||||
registerBlock(new BlockBOPSapling().setBlockName("saplings"), ItemBlockSapling.class);
|
registerBlock(new BlockBOPSapling().setBlockName("saplings"), ItemBlockSapling.class);
|
||||||
registerBlock(new BlockBOPColorizedSapling().setBlockName("colorizedSaplings"), ItemBlockColorizedSapling.class);
|
registerBlock(new BlockBOPColorizedSapling().setBlockName("colorizedSaplings"), ItemBlockColorizedSapling.class);
|
||||||
|
|
||||||
//TODO: sand
|
|
||||||
registerBlock(new BlockBOPGeneric(Material.sand, BlockType.HARD_SAND).setBlockName("hardSand"));
|
registerBlock(new BlockBOPGeneric(Material.sand, BlockType.HARD_SAND).setBlockName("hardSand"));
|
||||||
//TODO: rock
|
|
||||||
registerBlock(new BlockBOPGeneric(Material.rock, BlockType.HARD_DIRT).setBlockName("hardDirt"));
|
registerBlock(new BlockBOPGeneric(Material.rock, BlockType.HARD_DIRT).setBlockName("hardDirt"));
|
||||||
|
|
||||||
//TODO: sand
|
|
||||||
registerBlock(new BlockBOPGeneric(Material.sand, BlockType.HOLY_DIRT).setBlockName("holyDirt"));
|
registerBlock(new BlockBOPGeneric(Material.sand, BlockType.HOLY_DIRT).setBlockName("holyDirt"));
|
||||||
registerBlock(new BlockBOPSkystone().setBlockName("holyStone"), ItemBlockSkystone.class);
|
registerBlock(new BlockBOPSkystone().setBlockName("holyStone"), ItemBlockSkystone.class);
|
||||||
|
|
||||||
//TODO: glass
|
|
||||||
registerBlock(new BlockBOPGeneric(Material.glass, BlockType.CRYSTAL).setBlockName("crystal"));
|
registerBlock(new BlockBOPGeneric(Material.glass, BlockType.CRYSTAL).setBlockName("crystal"));
|
||||||
registerBlock(new BlockPromisedPortal().setBlockName("promisedPortal"));
|
|
||||||
|
|
||||||
registerBlock(new BlockBOPGems().setBlockName("gemOre"), ItemBlockGems.class);
|
registerBlock(new BlockBOPGems().setBlockName("gemOre"), ItemBlockGems.class);
|
||||||
|
|
||||||
registerBlock(new BlockMoss().setBlockName("moss"), ItemBlockMoss.class);
|
registerBlock(new BlockMoss().setBlockName("moss"), ItemBlockMoss.class);
|
||||||
|
|
||||||
//TODO: rock
|
|
||||||
registerBlock(new BlockBOPGeneric(Material.rock, BlockType.CRAG_ROCK).setBlockName("cragRock"));
|
registerBlock(new BlockBOPGeneric(Material.rock, BlockType.CRAG_ROCK).setBlockName("cragRock"));
|
||||||
|
|
||||||
registerBlock(new BlockCloud().setBlockName("cloud"));
|
registerBlock(new BlockCloud().setBlockName("cloud"));
|
||||||
|
@ -104,17 +97,13 @@ public class BOPBlocks
|
||||||
|
|
||||||
registerBlock(new BlockBOPPlank().setBlockName("planks"), ItemBlockPlank.class);
|
registerBlock(new BlockBOPPlank().setBlockName("planks"), ItemBlockPlank.class);
|
||||||
|
|
||||||
//TODO: wood
|
|
||||||
BlockBOPSlab woodenSingleSlab1 = (BlockBOPSlab)new BlockBOPSlab(false, Material.wood, SlabCategory.WOOD1).setBlockName("woodenSingleSlab1");
|
BlockBOPSlab woodenSingleSlab1 = (BlockBOPSlab)new BlockBOPSlab(false, Material.wood, SlabCategory.WOOD1).setBlockName("woodenSingleSlab1");
|
||||||
//TODO: wood
|
|
||||||
BlockBOPSlab woodenDoubleSlab1 = (BlockBOPSlab)new BlockBOPSlab(true, Material.wood, SlabCategory.WOOD1).setBlockName("woodenDoubleSlab1");
|
BlockBOPSlab woodenDoubleSlab1 = (BlockBOPSlab)new BlockBOPSlab(true, Material.wood, SlabCategory.WOOD1).setBlockName("woodenDoubleSlab1");
|
||||||
|
|
||||||
registerBlock(woodenSingleSlab1, ItemBlockSlab.class, woodenSingleSlab1, woodenDoubleSlab1);
|
registerBlock(woodenSingleSlab1, ItemBlockSlab.class, woodenSingleSlab1, woodenDoubleSlab1);
|
||||||
registerBlock(woodenDoubleSlab1, ItemBlockSlab.class, woodenSingleSlab1, woodenDoubleSlab1);
|
registerBlock(woodenDoubleSlab1, ItemBlockSlab.class, woodenSingleSlab1, woodenDoubleSlab1);
|
||||||
|
|
||||||
//TODO: wood
|
|
||||||
BlockBOPSlab woodenSingleSlab2 = (BlockBOPSlab)new BlockBOPSlab(false, Material.wood, SlabCategory.WOOD2).setBlockName("woodenSingleSlab2");
|
BlockBOPSlab woodenSingleSlab2 = (BlockBOPSlab)new BlockBOPSlab(false, Material.wood, SlabCategory.WOOD2).setBlockName("woodenSingleSlab2");
|
||||||
//TODO: wood
|
|
||||||
BlockBOPSlab woodenDoubleSlab2 = (BlockBOPSlab)new BlockBOPSlab(true, Material.wood, SlabCategory.WOOD2).setBlockName("woodenDoubleSlab2");
|
BlockBOPSlab woodenDoubleSlab2 = (BlockBOPSlab)new BlockBOPSlab(true, Material.wood, SlabCategory.WOOD2).setBlockName("woodenDoubleSlab2");
|
||||||
|
|
||||||
registerBlock(woodenSingleSlab2, ItemBlockSlab.class, woodenSingleSlab2, woodenDoubleSlab2);
|
registerBlock(woodenSingleSlab2, ItemBlockSlab.class, woodenSingleSlab2, woodenDoubleSlab2);
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
package biomesoplenty.common.core;
|
package biomesoplenty.common.core;
|
||||||
|
|
||||||
import biomesoplenty.common.configuration.BOPConfigurationIDs;
|
|
||||||
import biomesoplenty.common.world.WorldProviderBOPHell;
|
import biomesoplenty.common.world.WorldProviderBOPHell;
|
||||||
import biomesoplenty.common.world.WorldProviderPromised;
|
|
||||||
import net.minecraftforge.common.DimensionManager;
|
import net.minecraftforge.common.DimensionManager;
|
||||||
|
|
||||||
public class BOPDimensions
|
public class BOPDimensions
|
||||||
|
@ -22,11 +20,9 @@ public class BOPDimensions
|
||||||
private static void registerProviders()
|
private static void registerProviders()
|
||||||
{
|
{
|
||||||
DimensionManager.registerProviderType(-1, WorldProviderBOPHell.class, true);
|
DimensionManager.registerProviderType(-1, WorldProviderBOPHell.class, true);
|
||||||
DimensionManager.registerProviderType(BOPConfigurationIDs.promisedLandDimID, WorldProviderPromised.class, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void registerDimensions()
|
private static void registerDimensions()
|
||||||
{
|
{
|
||||||
DimensionManager.registerDimension(BOPConfigurationIDs.promisedLandDimID, BOPConfigurationIDs.promisedLandDimID);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
package biomesoplenty.common.core;
|
package biomesoplenty.common.core;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map.Entry;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.block.BlockDispenser;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
|
||||||
import net.minecraft.util.WeightedRandomChestContent;
|
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
|
||||||
import net.minecraftforge.common.ChestGenHooks;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import biomesoplenty.api.BOPItemHelper;
|
import biomesoplenty.api.BOPItemHelper;
|
||||||
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
||||||
import biomesoplenty.common.entities.projectiles.dispenser.DispenserBehaviourDart;
|
import biomesoplenty.common.entities.projectiles.dispenser.DispenserBehaviourDart;
|
||||||
import biomesoplenty.common.entities.projectiles.dispenser.DispenserBehaviourMudball;
|
import biomesoplenty.common.entities.projectiles.dispenser.DispenserBehaviourMudball;
|
||||||
import biomesoplenty.common.world.decoration.ForcedDecorators;
|
import biomesoplenty.common.world.decoration.ForcedDecorators;
|
||||||
import biomesoplenty.common.world.decoration.IBOPDecoration;
|
import biomesoplenty.common.world.decoration.IBOPBiome;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
||||||
|
import net.minecraft.block.BlockDispenser;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.util.WeightedRandomChestContent;
|
||||||
|
import net.minecraft.world.biome.BiomeGenBase;
|
||||||
|
import net.minecraftforge.common.ChestGenHooks;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BOPVanillaCompat
|
public class BOPVanillaCompat
|
||||||
{
|
{
|
||||||
|
@ -33,9 +33,7 @@ public class BOPVanillaCompat
|
||||||
|
|
||||||
private static void registerDispenserBehaviours()
|
private static void registerDispenserBehaviours()
|
||||||
{
|
{
|
||||||
//TODO: dispenseBehaviourRegistry
|
|
||||||
BlockDispenser.dispenseBehaviorRegistry.putObject(BOPItemHelper.get("mudball"), new DispenserBehaviourMudball());
|
BlockDispenser.dispenseBehaviorRegistry.putObject(BOPItemHelper.get("mudball"), new DispenserBehaviourMudball());
|
||||||
//TODO: dispenseBehaviourRegistry
|
|
||||||
BlockDispenser.dispenseBehaviorRegistry.putObject(BOPItemHelper.get("dart"), new DispenserBehaviourDart());
|
BlockDispenser.dispenseBehaviorRegistry.putObject(BOPItemHelper.get("dart"), new DispenserBehaviourDart());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,16 +93,15 @@ public class BOPVanillaCompat
|
||||||
|
|
||||||
private static void addBonemealFlowers()
|
private static void addBonemealFlowers()
|
||||||
{
|
{
|
||||||
//TODO: getBiomeGenArray()
|
|
||||||
for (BiomeGenBase biome : BiomeGenBase.getBiomeGenArray())
|
for (BiomeGenBase biome : BiomeGenBase.getBiomeGenArray())
|
||||||
{
|
{
|
||||||
if (biome != null)
|
if (biome != null)
|
||||||
{
|
{
|
||||||
IBOPDecoration bopDecoration = null;
|
IBOPBiome bopDecoration = null;
|
||||||
|
|
||||||
if (biome instanceof IBOPDecoration)
|
if (biome instanceof IBOPBiome)
|
||||||
{
|
{
|
||||||
bopDecoration = (IBOPDecoration)biome;
|
bopDecoration = (IBOPBiome)biome;
|
||||||
}
|
}
|
||||||
else if (ForcedDecorators.biomeHasForcedDecorator(biome.biomeID))
|
else if (ForcedDecorators.biomeHasForcedDecorator(biome.biomeID))
|
||||||
{
|
{
|
||||||
|
@ -113,9 +110,9 @@ public class BOPVanillaCompat
|
||||||
|
|
||||||
if (bopDecoration != null)
|
if (bopDecoration != null)
|
||||||
{
|
{
|
||||||
if (bopDecoration.getWeightedWorldGenForBOPFlowers() != null && !bopDecoration.getWeightedWorldGenForBOPFlowers().isEmpty())
|
if (bopDecoration.weightedFlowerGen != null && !bopDecoration.weightedFlowerGen.isEmpty())
|
||||||
{
|
{
|
||||||
HashMap<WorldGenBOPFlora, Integer> flowerMap = bopDecoration.getWeightedWorldGenForBOPFlowers();
|
HashMap<WorldGenBOPFlora, Integer> flowerMap = bopDecoration.weightedFlowerGen;
|
||||||
|
|
||||||
for (Entry<WorldGenBOPFlora, Integer> entry : flowerMap.entrySet())
|
for (Entry<WorldGenBOPFlora, Integer> entry : flowerMap.entrySet())
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,82 +1,22 @@
|
||||||
package biomesoplenty.common.core;
|
package biomesoplenty.common.core;
|
||||||
|
|
||||||
import static biomesoplenty.common.configuration.BOPConfigurationIDs.promisedLandDimID;
|
import biomesoplenty.api.BOPBiomeHelper;
|
||||||
|
import biomesoplenty.api.BOPBiomeHelper.BOPBiomeEntry;
|
||||||
|
import biomesoplenty.api.BOPBiomeHelper.TemperatureType;
|
||||||
|
import biomesoplenty.common.biomes.*;
|
||||||
|
import biomesoplenty.common.configuration.BOPConfigurationIDs;
|
||||||
|
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
||||||
|
import biomesoplenty.common.world.WorldTypeBOP;
|
||||||
|
import biomesoplenty.common.world.decoration.BOPDecorationManager;
|
||||||
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
import net.minecraft.world.biome.BiomeGenBase;
|
||||||
import net.minecraft.world.biome.WorldChunkManager;
|
import net.minecraft.world.biome.WorldChunkManager;
|
||||||
import net.minecraftforge.common.BiomeDictionary;
|
import net.minecraftforge.common.BiomeDictionary;
|
||||||
import net.minecraftforge.common.BiomeDictionary.Type;
|
import net.minecraftforge.common.BiomeDictionary.Type;
|
||||||
import net.minecraftforge.common.BiomeManager;
|
import net.minecraftforge.common.BiomeManager;
|
||||||
import biomesoplenty.api.BOPBiomeHelper;
|
|
||||||
import biomesoplenty.api.BOPBiomeHelper.BOPBiomeEntry;
|
|
||||||
import biomesoplenty.api.BOPBiomeHelper.TemperatureType;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenAlps;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenArctic;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenBambooForest;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenBayou;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenBog;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenBorealForest;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenBrushland;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenCanyon;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenChaparral;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenCherryBlossomGrove;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenConiferousForest;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenConiferousForestSnow;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenCrag;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenDeadForest;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenDeadSwamp;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenDeciduousForest;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenDunes;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenFen;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenFlowerField;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenFrostForest;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenGrassland;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenGrove;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenHeathland;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenHighland;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenJadeCliffs;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenLavenderFields;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenLushDesert;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenLushSwamp;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenMapleWoods;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenMarsh;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenMeadow;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenMoor;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenMountain;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenMysticGrove;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenOminousWoods;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenOriginValley;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenOutback;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenPasture;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenPrairie;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenQuagmire;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenRainforest;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenRedwoodForest;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenSacredSprings;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenSeasonalForest;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenShield;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenShrubland;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenSilkglades;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenSludgepit;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenSpruceWoods;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenTemperateRainforest;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenThicket;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenTimber;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenTropicalRainforest;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenTropics;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenTundra;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenVolcano;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenWasteland;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenWetland;
|
|
||||||
import biomesoplenty.common.biomes.BiomeGenWoodland;
|
|
||||||
import biomesoplenty.common.biomes.promisedland.BiomeGenPromisedLandForest;
|
|
||||||
import biomesoplenty.common.biomes.promisedland.BiomeGenPromisedLandPlains;
|
|
||||||
import biomesoplenty.common.biomes.promisedland.BiomeGenPromisedLandSwamp;
|
|
||||||
import biomesoplenty.common.configuration.BOPConfigurationIDs;
|
|
||||||
import biomesoplenty.common.configuration.BOPConfigurationMisc;
|
|
||||||
import biomesoplenty.common.world.WorldTypeBOP;
|
|
||||||
|
|
||||||
public class BOPBiomes
|
public class BOPWorld
|
||||||
{
|
{
|
||||||
public static WorldTypeBOP worldTypeBOP;
|
public static WorldTypeBOP worldTypeBOP;
|
||||||
|
|
||||||
|
@ -84,6 +24,8 @@ public class BOPBiomes
|
||||||
|
|
||||||
public static void init()
|
public static void init()
|
||||||
{
|
{
|
||||||
|
GameRegistry.registerWorldGenerator(new BOPDecorationManager(), 0);
|
||||||
|
|
||||||
BOPBiomeHelper.init();
|
BOPBiomeHelper.init();
|
||||||
registerBiomes();
|
registerBiomes();
|
||||||
addBiomesToDictionary();
|
addBiomesToDictionary();
|
||||||
|
@ -176,10 +118,6 @@ public class BOPBiomes
|
||||||
registerBiome(new BOPBiomeEntry(new BiomeGenWasteland(BOPConfigurationIDs.wastelandID).setBiomeName("Wasteland"), TemperatureType.HOT, 25));
|
registerBiome(new BOPBiomeEntry(new BiomeGenWasteland(BOPConfigurationIDs.wastelandID).setBiomeName("Wasteland"), TemperatureType.HOT, 25));
|
||||||
registerBiome(new BOPBiomeEntry(new BiomeGenWetland(BOPConfigurationIDs.wetlandID).setBiomeName("Wetland"), TemperatureType.WARM, 50));
|
registerBiome(new BOPBiomeEntry(new BiomeGenWetland(BOPConfigurationIDs.wetlandID).setBiomeName("Wetland"), TemperatureType.WARM, 50));
|
||||||
registerBiome(new BOPBiomeEntry(new BiomeGenWoodland(BOPConfigurationIDs.woodlandID).setBiomeName("Woodland"), TemperatureType.WARM, 50));
|
registerBiome(new BOPBiomeEntry(new BiomeGenWoodland(BOPConfigurationIDs.woodlandID).setBiomeName("Woodland"), TemperatureType.WARM, 50));
|
||||||
|
|
||||||
registerBiome(new BOPBiomeEntry(new BiomeGenPromisedLandForest(BOPConfigurationIDs.wonderousWoodsID).setBiomeName("Wonderous Woods"), TemperatureType.WARM, 50), promisedLandDimID);
|
|
||||||
registerBiome(new BOPBiomeEntry(new BiomeGenPromisedLandPlains(BOPConfigurationIDs.majesticMeadowID).setBiomeName("Majestic Meadow"), TemperatureType.WARM, 50), promisedLandDimID);
|
|
||||||
registerBiome(new BOPBiomeEntry(new BiomeGenPromisedLandSwamp(BOPConfigurationIDs.blessedBogID).setBiomeName("Blessed Bog"), TemperatureType.WARM, 50), promisedLandDimID);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void addSpawnBiomes()
|
private static void addSpawnBiomes()
|
||||||
|
@ -189,9 +127,7 @@ public class BOPBiomes
|
||||||
clearAllSpawnBiomes();
|
clearAllSpawnBiomes();
|
||||||
|
|
||||||
addSpawnBiome(BiomeGenBase.beach);
|
addSpawnBiome(BiomeGenBase.beach);
|
||||||
//TODO: stoneBeach
|
|
||||||
addSpawnBiome(BiomeGenBase.stoneBeach);
|
addSpawnBiome(BiomeGenBase.stoneBeach);
|
||||||
//TODO: coldBeach
|
|
||||||
addSpawnBiome(BiomeGenBase.coldBeach);
|
addSpawnBiome(BiomeGenBase.coldBeach);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -295,11 +231,6 @@ public class BOPBiomes
|
||||||
//BiomeDictionary.registerBiomeType(BOPBiomeHelper.getBOPBiome("polar"), Type.FROZEN, Type.WATER);
|
//BiomeDictionary.registerBiomeType(BOPBiomeHelper.getBOPBiome("polar"), Type.FROZEN, Type.WATER);
|
||||||
BiomeDictionary.registerBiomeType(BOPBiomeHelper.get("prairie"), Type.PLAINS);
|
BiomeDictionary.registerBiomeType(BOPBiomeHelper.get("prairie"), Type.PLAINS);
|
||||||
|
|
||||||
BiomeDictionary.registerBiomeType(BOPBiomeHelper.get(promisedLandDimID, "wonderousWoods"), Type.FOREST, Type.MAGICAL);
|
|
||||||
BiomeDictionary.registerBiomeType(BOPBiomeHelper.get(promisedLandDimID, "majesticMeadow"), Type.PLAINS, Type.MAGICAL);
|
|
||||||
//BiomeDictionary.registerBiomeType(BOPBiomeHelper.get(promisedLandDimID, "promisedLandShrub"), Type.PLAINS, Type.FOREST, Type.MAGICAL);
|
|
||||||
BiomeDictionary.registerBiomeType(BOPBiomeHelper.get(promisedLandDimID, "blessedBog"), Type.SWAMP, Type.MAGICAL);
|
|
||||||
|
|
||||||
BiomeDictionary.registerBiomeType(BOPBiomeHelper.get("quagmire"), Type.WASTELAND, Type.SWAMP);
|
BiomeDictionary.registerBiomeType(BOPBiomeHelper.get("quagmire"), Type.WASTELAND, Type.SWAMP);
|
||||||
BiomeDictionary.registerBiomeType(BOPBiomeHelper.get("rainforest"), Type.JUNGLE, Type.HILLS, Type.FOREST);
|
BiomeDictionary.registerBiomeType(BOPBiomeHelper.get("rainforest"), Type.JUNGLE, Type.HILLS, Type.FOREST);
|
||||||
BiomeDictionary.registerBiomeType(BOPBiomeHelper.get("redwoodForest"), Type.FOREST);
|
BiomeDictionary.registerBiomeType(BOPBiomeHelper.get("redwoodForest"), Type.FOREST);
|
|
@ -1,6 +1,5 @@
|
||||||
package biomesoplenty.common.eventhandler;
|
package biomesoplenty.common.eventhandler;
|
||||||
|
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
|
||||||
import biomesoplenty.common.eventhandler.entity.DyeEventHandler;
|
import biomesoplenty.common.eventhandler.entity.DyeEventHandler;
|
||||||
import biomesoplenty.common.eventhandler.entity.FlippersEventHandler;
|
import biomesoplenty.common.eventhandler.entity.FlippersEventHandler;
|
||||||
import biomesoplenty.common.eventhandler.entity.TemptEventHandler;
|
import biomesoplenty.common.eventhandler.entity.TemptEventHandler;
|
||||||
|
@ -13,11 +12,11 @@ import biomesoplenty.common.eventhandler.network.ConnectionEventHandler;
|
||||||
import biomesoplenty.common.eventhandler.potions.PotionParalysisEventHandler;
|
import biomesoplenty.common.eventhandler.potions.PotionParalysisEventHandler;
|
||||||
import biomesoplenty.common.eventhandler.potions.PotionPossessionEventHandler;
|
import biomesoplenty.common.eventhandler.potions.PotionPossessionEventHandler;
|
||||||
import biomesoplenty.common.eventhandler.world.BiomeSizeEventHandler;
|
import biomesoplenty.common.eventhandler.world.BiomeSizeEventHandler;
|
||||||
import biomesoplenty.common.eventhandler.world.DecorateBiomeEventHandler;
|
|
||||||
import biomesoplenty.common.eventhandler.world.DecorationModificationEventHandler;
|
import biomesoplenty.common.eventhandler.world.DecorationModificationEventHandler;
|
||||||
import biomesoplenty.common.eventhandler.world.MapGenEventHandler;
|
import biomesoplenty.common.eventhandler.world.MapGenEventHandler;
|
||||||
import biomesoplenty.common.eventhandler.world.VillageMaterialEventHandler;
|
import biomesoplenty.common.eventhandler.world.VillageMaterialEventHandler;
|
||||||
import cpw.mods.fml.common.FMLCommonHandler;
|
import cpw.mods.fml.common.FMLCommonHandler;
|
||||||
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
|
|
||||||
public class BOPEventHandlers
|
public class BOPEventHandlers
|
||||||
{
|
{
|
||||||
|
@ -38,7 +37,6 @@ public class BOPEventHandlers
|
||||||
|
|
||||||
private static void registerWorldEventHandlers()
|
private static void registerWorldEventHandlers()
|
||||||
{
|
{
|
||||||
MinecraftForge.EVENT_BUS.register(new DecorateBiomeEventHandler());
|
|
||||||
MinecraftForge.TERRAIN_GEN_BUS.register(new DecorationModificationEventHandler());
|
MinecraftForge.TERRAIN_GEN_BUS.register(new DecorationModificationEventHandler());
|
||||||
MinecraftForge.TERRAIN_GEN_BUS.register(new BiomeSizeEventHandler());
|
MinecraftForge.TERRAIN_GEN_BUS.register(new BiomeSizeEventHandler());
|
||||||
MinecraftForge.TERRAIN_GEN_BUS.register(new VillageMaterialEventHandler());
|
MinecraftForge.TERRAIN_GEN_BUS.register(new VillageMaterialEventHandler());
|
||||||
|
|
|
@ -1,97 +0,0 @@
|
||||||
package biomesoplenty.common.eventhandler.world;
|
|
||||||
|
|
||||||
import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.FLOWERS;
|
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import net.minecraftforge.event.terraingen.DecorateBiomeEvent;
|
|
||||||
import net.minecraftforge.event.terraingen.TerrainGen;
|
|
||||||
import biomesoplenty.common.world.decoration.BOPWorldFeatures;
|
|
||||||
import biomesoplenty.common.world.decoration.ForcedDecorators;
|
|
||||||
import biomesoplenty.common.world.decoration.IBOPDecoration;
|
|
||||||
import biomesoplenty.common.world.generation.ForcedBOPWorldGenerators;
|
|
||||||
import biomesoplenty.common.world.generation.IWorldGeneratorBOP;
|
|
||||||
import biomesoplenty.common.world.generation.WorldGenFieldAssociation;
|
|
||||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
|
||||||
|
|
||||||
public class DecorateBiomeEventHandler
|
|
||||||
{
|
|
||||||
@SubscribeEvent
|
|
||||||
public void onBiomeDecorate(DecorateBiomeEvent.Pre event)
|
|
||||||
{
|
|
||||||
World world = event.world;
|
|
||||||
|
|
||||||
int chunkX = event.chunkX;
|
|
||||||
int chunkZ = event.chunkZ;
|
|
||||||
|
|
||||||
Random random = event.rand;
|
|
||||||
|
|
||||||
BiomeGenBase biome = world.getBiomeGenForCoordsBody(chunkX + 16, chunkZ + 16);
|
|
||||||
|
|
||||||
IBOPDecoration bopDecoration = null;
|
|
||||||
|
|
||||||
if (biome instanceof IBOPDecoration)
|
|
||||||
{
|
|
||||||
bopDecoration = (IBOPDecoration)biome;
|
|
||||||
}
|
|
||||||
else if (ForcedDecorators.biomeHasForcedDecorator(biome.biomeID))
|
|
||||||
{
|
|
||||||
bopDecoration = ForcedDecorators.getForcedDecorator(biome.biomeID);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bopDecoration != null)
|
|
||||||
{
|
|
||||||
for (Field worldGeneratorField : BOPWorldFeatures.class.getFields())
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
WorldGenerator worldGenerator = null;
|
|
||||||
|
|
||||||
if (worldGeneratorField.getName().equals("bopFlowersPerChunk") && TerrainGen.decorate(world, random, chunkX, chunkZ, FLOWERS))
|
|
||||||
{
|
|
||||||
worldGenerator = bopDecoration.getRandomWorldGenForBOPFlowers(random);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
worldGenerator = WorldGenFieldAssociation.getAssociatedWorldGenerator(worldGeneratorField.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (worldGenerator != null)
|
|
||||||
{
|
|
||||||
IWorldGeneratorBOP worldGeneratorBOP = null;
|
|
||||||
|
|
||||||
if (worldGenerator instanceof IWorldGeneratorBOP)
|
|
||||||
{
|
|
||||||
worldGeneratorBOP = (IWorldGeneratorBOP)worldGenerator;
|
|
||||||
}
|
|
||||||
else if (ForcedBOPWorldGenerators.hasForcedGenerator(worldGenerator.getClass()))
|
|
||||||
{
|
|
||||||
worldGeneratorBOP = ForcedBOPWorldGenerators.getForcedGenerator(worldGenerator.getClass());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (worldGeneratorBOP != null)
|
|
||||||
{
|
|
||||||
worldGeneratorBOP.doGeneration(world, random, worldGeneratorField, worldGenerator, biome, bopDecoration, chunkX, chunkZ);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
Throwable cause = e.getCause();
|
|
||||||
|
|
||||||
if (e.getMessage() != null && e.getMessage().equals("Already decorating!!") || (cause != null && cause.getMessage() != null && cause.getMessage().equals("Already decorating!!")))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,18 +1,15 @@
|
||||||
package biomesoplenty.common.eventhandler.world;
|
package biomesoplenty.common.eventhandler.world;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenLakes;
|
|
||||||
import net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate;
|
|
||||||
import net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType;
|
|
||||||
import net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate;
|
|
||||||
import biomesoplenty.common.world.decoration.ForcedDecorators;
|
import biomesoplenty.common.world.decoration.ForcedDecorators;
|
||||||
import biomesoplenty.common.world.decoration.IBOPDecoration;
|
import biomesoplenty.common.world.decoration.IBOPBiome;
|
||||||
import cpw.mods.fml.common.eventhandler.Event.Result;
|
import cpw.mods.fml.common.eventhandler.Event.Result;
|
||||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.biome.BiomeGenBase;
|
||||||
|
import net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate;
|
||||||
|
import net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class DecorationModificationEventHandler
|
public class DecorationModificationEventHandler
|
||||||
{
|
{
|
||||||
|
@ -33,11 +30,11 @@ public class DecorationModificationEventHandler
|
||||||
Random random = event.rand;
|
Random random = event.rand;
|
||||||
|
|
||||||
BiomeGenBase biome = world.getBiomeGenForCoordsBody(chunkX + 16, chunkZ + 16);
|
BiomeGenBase biome = world.getBiomeGenForCoordsBody(chunkX + 16, chunkZ + 16);
|
||||||
IBOPDecoration bopDecoration = null;
|
IBOPBiome bopDecoration = null;
|
||||||
|
|
||||||
if (biome instanceof IBOPDecoration)
|
if (biome instanceof IBOPBiome)
|
||||||
{
|
{
|
||||||
bopDecoration = (IBOPDecoration)biome;
|
bopDecoration = (IBOPBiome)biome;
|
||||||
}
|
}
|
||||||
else if (ForcedDecorators.biomeHasForcedDecorator(biome.biomeID))
|
else if (ForcedDecorators.biomeHasForcedDecorator(biome.biomeID))
|
||||||
{
|
{
|
||||||
|
@ -48,7 +45,7 @@ public class DecorationModificationEventHandler
|
||||||
{
|
{
|
||||||
if (event.type == Decorate.EventType.PUMPKIN)
|
if (event.type == Decorate.EventType.PUMPKIN)
|
||||||
{
|
{
|
||||||
if (!bopDecoration.getWorldFeatures().generatePumpkins)
|
if (!(Boolean)bopDecoration.getBiomeFeatures().getFeature("generatePumpkins"))
|
||||||
{
|
{
|
||||||
event.setResult(Result.DENY);
|
event.setResult(Result.DENY);
|
||||||
}
|
}
|
||||||
|
@ -67,11 +64,11 @@ public class DecorationModificationEventHandler
|
||||||
Random random = event.rand;
|
Random random = event.rand;
|
||||||
|
|
||||||
BiomeGenBase biome = world.getBiomeGenForCoordsBody(chunkX + 16, chunkZ + 16);
|
BiomeGenBase biome = world.getBiomeGenForCoordsBody(chunkX + 16, chunkZ + 16);
|
||||||
IBOPDecoration bopDecoration = null;
|
IBOPBiome bopDecoration = null;
|
||||||
|
|
||||||
if (biome instanceof IBOPDecoration)
|
if (biome instanceof IBOPBiome)
|
||||||
{
|
{
|
||||||
bopDecoration = (IBOPDecoration)biome;
|
bopDecoration = (IBOPBiome)biome;
|
||||||
}
|
}
|
||||||
else if (ForcedDecorators.biomeHasForcedDecorator(biome.biomeID))
|
else if (ForcedDecorators.biomeHasForcedDecorator(biome.biomeID))
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,48 +0,0 @@
|
||||||
package biomesoplenty.common.helpers;
|
|
||||||
|
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
|
||||||
|
|
||||||
public class BiomeCacheBlockPromised
|
|
||||||
{
|
|
||||||
/** An array of chunk temperatures saved by this cache. */
|
|
||||||
public float[] temperatureValues;
|
|
||||||
|
|
||||||
/** An array of chunk rainfall values saved by this cache. */
|
|
||||||
public float[] rainfallValues;
|
|
||||||
|
|
||||||
/** The array of biome types stored in this BiomeCacheBlock. */
|
|
||||||
public BiomeGenBase[] biomes;
|
|
||||||
|
|
||||||
/** The x coordinate of the BiomeCacheBlock. */
|
|
||||||
public int xPosition;
|
|
||||||
|
|
||||||
/** The z coordinate of the BiomeCacheBlock. */
|
|
||||||
public int zPosition;
|
|
||||||
|
|
||||||
/** The last time this BiomeCacheBlock was accessed, in milliseconds. */
|
|
||||||
public long lastAccessTime;
|
|
||||||
|
|
||||||
/** The BiomeCache object that contains this BiomeCacheBlock */
|
|
||||||
final BiomeCachePromised theBiomeCache;
|
|
||||||
|
|
||||||
public BiomeCacheBlockPromised(BiomeCachePromised par1BiomeCache, int par2, int par3)
|
|
||||||
{
|
|
||||||
theBiomeCache = par1BiomeCache;
|
|
||||||
temperatureValues = new float[256];
|
|
||||||
rainfallValues = new float[256];
|
|
||||||
biomes = new BiomeGenBase[256];
|
|
||||||
xPosition = par2;
|
|
||||||
zPosition = par3;
|
|
||||||
BiomeCachePromised.getChunkManager(par1BiomeCache).getTemperatures(temperatureValues, par2 << 4, par3 << 4, 16, 16);
|
|
||||||
BiomeCachePromised.getChunkManager(par1BiomeCache).getRainfall(rainfallValues, par2 << 4, par3 << 4, 16, 16);
|
|
||||||
BiomeCachePromised.getChunkManager(par1BiomeCache).getBiomeGenAt(biomes, par2 << 4, par3 << 4, 16, 16, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the BiomeGenBase related to the x, z position from the cache block.
|
|
||||||
*/
|
|
||||||
public BiomeGenBase getBiomeGenAt(int par1, int par2)
|
|
||||||
{
|
|
||||||
return biomes[par1 & 15 | (par2 & 15) << 4];
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,13 +1,12 @@
|
||||||
package biomesoplenty.common.helpers;
|
package biomesoplenty.common.helpers;
|
||||||
|
|
||||||
|
import biomesoplenty.common.world.WorldChunkManagerBOPHell;
|
||||||
|
import net.minecraft.util.LongHashMap;
|
||||||
|
import net.minecraft.world.biome.BiomeGenBase;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.minecraft.util.LongHashMap;
|
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
|
||||||
import biomesoplenty.common.world.WorldChunkManagerBOPHell;
|
|
||||||
import biomesoplenty.common.world.WorldChunkManagerPromised;
|
|
||||||
|
|
||||||
public class BiomeCacheHell
|
public class BiomeCacheHell
|
||||||
{
|
{
|
||||||
/** Reference to the WorldChunkManager */
|
/** Reference to the WorldChunkManager */
|
||||||
|
|
|
@ -1,104 +0,0 @@
|
||||||
package biomesoplenty.common.helpers;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import net.minecraft.util.LongHashMap;
|
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
|
||||||
import biomesoplenty.common.world.WorldChunkManagerPromised;
|
|
||||||
|
|
||||||
public class BiomeCachePromised
|
|
||||||
{
|
|
||||||
/** Reference to the WorldChunkManager */
|
|
||||||
private final WorldChunkManagerPromised chunkManager;
|
|
||||||
|
|
||||||
/** The last time this BiomeCache was cleaned, in milliseconds. */
|
|
||||||
private long lastCleanupTime = 0L;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The map of keys to BiomeCacheBlocks. Keys are based on the chunk x, z coordinates as (x | z << 32).
|
|
||||||
*/
|
|
||||||
private LongHashMap cacheMap = new LongHashMap();
|
|
||||||
|
|
||||||
/** The list of cached BiomeCacheBlocks */
|
|
||||||
@SuppressWarnings("rawtypes")
|
|
||||||
private List cache = new ArrayList();
|
|
||||||
|
|
||||||
public BiomeCachePromised(WorldChunkManagerPromised par1WorldChunkManager)
|
|
||||||
{
|
|
||||||
chunkManager = par1WorldChunkManager;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a biome cache block at location specified.
|
|
||||||
*/
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public BiomeCacheBlockPromised getBiomeCacheBlock(int par1, int par2)
|
|
||||||
{
|
|
||||||
par1 >>= 4;
|
|
||||||
par2 >>= 4;
|
|
||||||
long var3 = par1 & 4294967295L | (par2 & 4294967295L) << 32;
|
|
||||||
BiomeCacheBlockPromised var5 = (BiomeCacheBlockPromised)cacheMap.getValueByKey(var3);
|
|
||||||
|
|
||||||
if (var5 == null)
|
|
||||||
{
|
|
||||||
var5 = new BiomeCacheBlockPromised(this, par1, par2);
|
|
||||||
cacheMap.add(var3, var5);
|
|
||||||
cache.add(var5);
|
|
||||||
}
|
|
||||||
|
|
||||||
var5.lastAccessTime = System.currentTimeMillis();
|
|
||||||
return var5;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the BiomeGenBase related to the x, z position from the cache.
|
|
||||||
*/
|
|
||||||
public BiomeGenBase getBiomeGenAt(int par1, int par2)
|
|
||||||
{
|
|
||||||
return this.getBiomeCacheBlock(par1, par2).getBiomeGenAt(par1, par2);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Removes BiomeCacheBlocks from this cache that haven't been accessed in at least 30 seconds.
|
|
||||||
*/
|
|
||||||
public void cleanupCache()
|
|
||||||
{
|
|
||||||
long var1 = System.currentTimeMillis();
|
|
||||||
long var3 = var1 - lastCleanupTime;
|
|
||||||
|
|
||||||
if (var3 > 7500L || var3 < 0L)
|
|
||||||
{
|
|
||||||
lastCleanupTime = var1;
|
|
||||||
|
|
||||||
for (int var5 = 0; var5 < cache.size(); ++var5)
|
|
||||||
{
|
|
||||||
BiomeCacheBlockPromised var6 = (BiomeCacheBlockPromised)cache.get(var5);
|
|
||||||
long var7 = var1 - var6.lastAccessTime;
|
|
||||||
|
|
||||||
if (var7 > 30000L || var7 < 0L)
|
|
||||||
{
|
|
||||||
cache.remove(var5--);
|
|
||||||
long var9 = var6.xPosition & 4294967295L | (var6.zPosition & 4294967295L) << 32;
|
|
||||||
cacheMap.remove(var9);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the array of cached biome types in the BiomeCacheBlock at the given location.
|
|
||||||
*/
|
|
||||||
public BiomeGenBase[] getCachedBiomes(int par1, int par2)
|
|
||||||
{
|
|
||||||
return this.getBiomeCacheBlock(par1, par2).biomes;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the world chunk manager object for a biome list.
|
|
||||||
*/
|
|
||||||
static WorldChunkManagerPromised getChunkManager(BiomeCachePromised par0BiomeCache)
|
|
||||||
{
|
|
||||||
return par0BiomeCache.chunkManager;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,255 +0,0 @@
|
||||||
package biomesoplenty.common.helpers;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
|
||||||
import biomesoplenty.common.world.features.WorldGenPromisedLandPortal;
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.entity.Entity;
|
|
||||||
import net.minecraft.util.Direction;
|
|
||||||
import net.minecraft.util.LongHashMap;
|
|
||||||
import net.minecraft.util.MathHelper;
|
|
||||||
import net.minecraft.world.ChunkCoordIntPair;
|
|
||||||
import net.minecraft.world.Teleporter;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.WorldServer;
|
|
||||||
|
|
||||||
public class TeleporterPromised extends Teleporter
|
|
||||||
{
|
|
||||||
private final WorldServer worldServerInstance;
|
|
||||||
private final LongHashMap destinationCoordinateCache = new LongHashMap();
|
|
||||||
@SuppressWarnings("rawtypes")
|
|
||||||
private final List destinationCoordinateKeys = new ArrayList();
|
|
||||||
private final boolean falling;
|
|
||||||
|
|
||||||
public TeleporterPromised(WorldServer worldServer)
|
|
||||||
{
|
|
||||||
super(worldServer);
|
|
||||||
falling = false;
|
|
||||||
worldServerInstance = worldServer;
|
|
||||||
}
|
|
||||||
|
|
||||||
public TeleporterPromised(WorldServer worldServer, boolean fall)
|
|
||||||
{
|
|
||||||
super(worldServer);
|
|
||||||
falling = fall;
|
|
||||||
worldServerInstance = worldServer;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void placeInPortal(Entity par1Entity, double x, double y, double z, float par8)
|
|
||||||
{
|
|
||||||
if (!falling)
|
|
||||||
{
|
|
||||||
if (!this.placeInExistingPortal(par1Entity, x, y, z, par8))
|
|
||||||
{
|
|
||||||
this.makePortal(par1Entity);
|
|
||||||
this.placeInExistingPortal(par1Entity, x, y, z, par8);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
par1Entity.setLocationAndAngles(x, 256.0, z, par1Entity.rotationYaw, 0.0F);
|
|
||||||
par1Entity.motionX = par1Entity.motionY = par1Entity.motionZ = 0.0D;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
@Override
|
|
||||||
public boolean placeInExistingPortal(Entity par1Entity, double x, double y, double z, float par8)
|
|
||||||
{
|
|
||||||
short var9 = 128;
|
|
||||||
double var10 = -1.0D;
|
|
||||||
int i = 0;
|
|
||||||
int j = 0;
|
|
||||||
int k = 0;
|
|
||||||
int var15 = MathHelper.floor_double(par1Entity.posX);
|
|
||||||
int var16 = MathHelper.floor_double(par1Entity.posZ);
|
|
||||||
long var17 = ChunkCoordIntPair.chunkXZ2Int(var15, var16);
|
|
||||||
boolean var19 = true;
|
|
||||||
double var27;
|
|
||||||
int var48;
|
|
||||||
|
|
||||||
if (destinationCoordinateCache.containsItem(var17))
|
|
||||||
{
|
|
||||||
PortalPosition portalposition = (PortalPosition) destinationCoordinateCache.getValueByKey(var17);
|
|
||||||
var10 = 0.0D;
|
|
||||||
i = portalposition.posX;
|
|
||||||
j = 131;
|
|
||||||
k = portalposition.posZ;
|
|
||||||
portalposition.lastUpdateTime = worldServerInstance.getTotalWorldTime();
|
|
||||||
var19 = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for (var48 = var15 - var9; var48 <= var15 + var9; ++var48)
|
|
||||||
{
|
|
||||||
double var21 = var48 + 0.5D - par1Entity.posX;
|
|
||||||
|
|
||||||
for (int var23 = var16 - var9; var23 <= var16 + var9; ++var23)
|
|
||||||
{
|
|
||||||
double var24 = var23 + 0.5D - par1Entity.posZ;
|
|
||||||
|
|
||||||
for (int var26 = worldServerInstance.getActualHeight() - 1; var26 >= 0; --var26)
|
|
||||||
{
|
|
||||||
if (worldServerInstance.getBlock(var48, var26, var23) == BOPBlockHelper.get("promisedPortal"))
|
|
||||||
{
|
|
||||||
while (worldServerInstance.getBlock(var48, var26 - 1, var23) == BOPBlockHelper.get("promisedPortal"))
|
|
||||||
{
|
|
||||||
--var26;
|
|
||||||
}
|
|
||||||
|
|
||||||
var27 = var26 + 0.5D - par1Entity.posY;
|
|
||||||
double var29 = var21 * var21 + var27 * var27 + var24 * var24;
|
|
||||||
|
|
||||||
if (var10 < 0.0D || var29 < var10)
|
|
||||||
{
|
|
||||||
var10 = var29;
|
|
||||||
i = var48;
|
|
||||||
j = var26;
|
|
||||||
k = var23;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (var10 >= 0.0D)
|
|
||||||
{
|
|
||||||
if (var19)
|
|
||||||
{
|
|
||||||
destinationCoordinateCache.add(var17, new PortalPosition(i, j, k, worldServerInstance.getTotalWorldTime()));
|
|
||||||
destinationCoordinateKeys.add(Long.valueOf(var17));
|
|
||||||
}
|
|
||||||
|
|
||||||
double var49 = i + 0.5D;
|
|
||||||
double var25 = j + 4.0D;
|
|
||||||
var27 = k + 0.5D;
|
|
||||||
int var50 = -1;
|
|
||||||
|
|
||||||
if (worldServerInstance.getBlock(i - 1, j, k) == BOPBlockHelper.get("promisedPortal"))
|
|
||||||
{
|
|
||||||
var50 = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (worldServerInstance.getBlock(i + 1, j, k) == BOPBlockHelper.get("promisedPortal"))
|
|
||||||
{
|
|
||||||
var50 = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (worldServerInstance.getBlock(i, j, k - 1) == BOPBlockHelper.get("promisedPortal"))
|
|
||||||
{
|
|
||||||
var50 = 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (worldServerInstance.getBlock(i, j, k + 1) == BOPBlockHelper.get("promisedPortal"))
|
|
||||||
{
|
|
||||||
var50 = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int var30 = par1Entity.getTeleportDirection();
|
|
||||||
|
|
||||||
if (var50 > -1)
|
|
||||||
{
|
|
||||||
int var31 = Direction.rotateLeft[var50];
|
|
||||||
int var32 = Direction.offsetX[var50];
|
|
||||||
int var33 = Direction.offsetZ[var50];
|
|
||||||
int var34 = Direction.offsetX[var31];
|
|
||||||
int var35 = Direction.offsetZ[var31];
|
|
||||||
boolean var36 = !isAirBlock(worldServerInstance, i + var32 + var34, j, k + var33 + var35) || !isAirBlock(worldServerInstance, i + var32 + var34, j + 1, k + var33 + var35);
|
|
||||||
boolean var37 = !isAirBlock(worldServerInstance, i + var32, j, k + var33) || !isAirBlock(worldServerInstance, i + var32, j + 1, k + var33);
|
|
||||||
|
|
||||||
if (var36 && var37)
|
|
||||||
{
|
|
||||||
var50 = Direction.rotateOpposite[var50];
|
|
||||||
var31 = Direction.rotateOpposite[var31];
|
|
||||||
var32 = Direction.offsetX[var50];
|
|
||||||
var33 = Direction.offsetZ[var50];
|
|
||||||
var34 = Direction.offsetX[var31];
|
|
||||||
var35 = Direction.offsetZ[var31];
|
|
||||||
var48 = i - var34;
|
|
||||||
var49 -= var34;
|
|
||||||
int var22 = k - var35;
|
|
||||||
var27 -= var35;
|
|
||||||
var36 = !isAirBlock(worldServerInstance, var48 + var32 + var34, j, var22 + var33 + var35) || !isAirBlock(worldServerInstance, var48 + var32 + var34, j + 1, var22 + var33 + var35);
|
|
||||||
var37 = !isAirBlock(worldServerInstance, var48 + var32, j, var22 + var33) || !isAirBlock(worldServerInstance, var48 + var32, j + 1, var22 + var33);
|
|
||||||
}
|
|
||||||
|
|
||||||
float var38 = 0.5F;
|
|
||||||
float var39 = 0.5F;
|
|
||||||
|
|
||||||
if (!var36 && var37)
|
|
||||||
{
|
|
||||||
var38 = 1.0F;
|
|
||||||
}
|
|
||||||
else if (var36 && !var37)
|
|
||||||
{
|
|
||||||
var38 = 0.0F;
|
|
||||||
}
|
|
||||||
else if (var36 && var37)
|
|
||||||
{
|
|
||||||
var39 = 0.0F;
|
|
||||||
}
|
|
||||||
|
|
||||||
var49 += var34 * var38 + var39 * var32;
|
|
||||||
var27 += var35 * var38 + var39 * var33;
|
|
||||||
float var40 = 0.0F;
|
|
||||||
float var41 = 0.0F;
|
|
||||||
float var42 = 0.0F;
|
|
||||||
float var43 = 0.0F;
|
|
||||||
|
|
||||||
if (var50 == var30)
|
|
||||||
{
|
|
||||||
var40 = 1.0F;
|
|
||||||
var41 = 1.0F;
|
|
||||||
}
|
|
||||||
else if (var50 == Direction.rotateOpposite[var30])
|
|
||||||
{
|
|
||||||
var40 = -1.0F;
|
|
||||||
var41 = -1.0F;
|
|
||||||
}
|
|
||||||
else if (var50 == Direction.rotateRight[var30])
|
|
||||||
{
|
|
||||||
var42 = 1.0F;
|
|
||||||
var43 = -1.0F;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var42 = -1.0F;
|
|
||||||
var43 = 1.0F;
|
|
||||||
}
|
|
||||||
|
|
||||||
double var44 = par1Entity.motionX;
|
|
||||||
double var46 = par1Entity.motionZ;
|
|
||||||
par1Entity.motionX = var44 * var40 + var46 * var43;
|
|
||||||
par1Entity.motionZ = var44 * var42 + var46 * var41;
|
|
||||||
par1Entity.rotationYaw = par8 - var30 * 90 + var50 * 90;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
par1Entity.motionX = par1Entity.motionY = par1Entity.motionZ = 0.0D;
|
|
||||||
}
|
|
||||||
|
|
||||||
par1Entity.setLocationAndAngles(var49 + 4, var25, var27, par1Entity.rotationYaw, par1Entity.rotationPitch);
|
|
||||||
return true;
|
|
||||||
} else
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean makePortal(Entity par1Entity)
|
|
||||||
{
|
|
||||||
int i = MathHelper.floor_double(par1Entity.posX - 8 );
|
|
||||||
int j = 130;
|
|
||||||
int k = MathHelper.floor_double(par1Entity.posZ - 8);
|
|
||||||
|
|
||||||
new WorldGenPromisedLandPortal().generate(worldServerInstance, worldServerInstance.rand, i, j, k);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean isAirBlock(World world, int x, int y, int z) {
|
|
||||||
return world.getBlock(x, y, z).isAir(world, x, y, z);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,22 +1,15 @@
|
||||||
package biomesoplenty.common.items;
|
package biomesoplenty.common.items;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.util.ChatComponentTranslation;
|
|
||||||
import net.minecraft.util.IIcon;
|
|
||||||
import net.minecraft.util.MathHelper;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import biomesoplenty.BiomesOPlenty;
|
import biomesoplenty.BiomesOPlenty;
|
||||||
import biomesoplenty.common.configuration.BOPConfigurationIDs;
|
|
||||||
import biomesoplenty.common.world.features.WorldGenPromisedLandPortal;
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.IIcon;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class ItemBOPAncientStaff extends Item
|
public class ItemBOPAncientStaff extends Item
|
||||||
{
|
{
|
||||||
|
@ -80,7 +73,6 @@ public class ItemBOPAncientStaff extends Item
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: public void getSubItems(Item item, CreativeTabs creativeTabs, List list)
|
|
||||||
public void getSubItems(Item item, CreativeTabs creativeTabs, List list)
|
public void getSubItems(Item item, CreativeTabs creativeTabs, List list)
|
||||||
{
|
{
|
||||||
for (int meta = 0; meta < parts.length; ++meta)
|
for (int meta = 0; meta < parts.length; ++meta)
|
||||||
|
@ -88,59 +80,4 @@ public class ItemBOPAncientStaff extends Item
|
||||||
list.add(new ItemStack(item, 1, meta));
|
list.add(new ItemStack(item, 1, meta));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World world, EntityPlayer player)
|
|
||||||
{
|
|
||||||
if (player.dimension == 0 || player.dimension == BOPConfigurationIDs.promisedLandDimID)
|
|
||||||
{
|
|
||||||
int i = MathHelper.floor_double(player.posX - 8);
|
|
||||||
int j = 145;
|
|
||||||
int k = MathHelper.floor_double(player.posZ - 8);
|
|
||||||
|
|
||||||
boolean isAir = true;
|
|
||||||
|
|
||||||
for (int iy = -1; iy < 4; iy++)
|
|
||||||
{
|
|
||||||
for (int ix = -2; ix < 3; ix++) {
|
|
||||||
for (int iz = -2; iz < 3; iz++)
|
|
||||||
// is air block
|
|
||||||
if (!world.getBlock(i + ix, j + iy, k + iz).isAir(world, i + ix, j + iy, k + iz))
|
|
||||||
{
|
|
||||||
isAir = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (par1ItemStack.getItemDamage() == 0)
|
|
||||||
{
|
|
||||||
if (isAir)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (!player.worldObj.isRemote)
|
|
||||||
{
|
|
||||||
if (player.dimension == 0)
|
|
||||||
{
|
|
||||||
//send player chat
|
|
||||||
player.addChatMessage(new ChatComponentTranslation("phrase.bop.promisedPortalOverworld"));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//send player chat
|
|
||||||
player.addChatMessage(new ChatComponentTranslation("phrase.bop.promisedPortalOther"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
boolean flag;
|
|
||||||
new WorldGenPromisedLandPortal().generate(world, world.rand, (int)player.posX, 130, (int)player.posZ);
|
|
||||||
|
|
||||||
par1ItemStack.setItemDamage(4);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return par1ItemStack;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,28 +1,15 @@
|
||||||
package biomesoplenty.common.items;
|
package biomesoplenty.common.items;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
|
||||||
import net.minecraft.entity.EntityLiving;
|
|
||||||
import net.minecraft.entity.IEntityLivingData;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.init.Items;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.util.ChatComponentText;
|
|
||||||
import net.minecraft.util.Facing;
|
|
||||||
import net.minecraft.util.IChatComponent;
|
|
||||||
import net.minecraft.util.IIcon;
|
|
||||||
import net.minecraft.util.MathHelper;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import biomesoplenty.BiomesOPlenty;
|
import biomesoplenty.BiomesOPlenty;
|
||||||
import biomesoplenty.api.BOPItemHelper;
|
|
||||||
import biomesoplenty.common.configuration.BOPConfigurationIDs;
|
|
||||||
import biomesoplenty.common.entities.EntityPixie;
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.IIcon;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class ItemJarFilled extends Item
|
public class ItemJarFilled extends Item
|
||||||
{
|
{
|
||||||
|
@ -81,6 +68,7 @@ public class ItemJarFilled extends Item
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*TODO: FEATURE
|
||||||
@Override
|
@Override
|
||||||
public boolean onItemUse(ItemStack itemStack, EntityPlayer entityPlayer, World world, int x, int y, int z, int side, float xoffset, float yoffset, float zoffset)
|
public boolean onItemUse(ItemStack itemStack, EntityPlayer entityPlayer, World world, int x, int y, int z, int side, float xoffset, float yoffset, float zoffset)
|
||||||
{
|
{
|
||||||
|
@ -146,4 +134,5 @@ public class ItemJarFilled extends Item
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}*/
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,608 +0,0 @@
|
||||||
package biomesoplenty.common.world;
|
|
||||||
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
|
||||||
import biomesoplenty.common.utils.RandomForcedPositive;
|
|
||||||
import biomesoplenty.common.world.noise.NoiseOctaves;
|
|
||||||
import cpw.mods.fml.common.eventhandler.Event.Result;
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.BlockSand;
|
|
||||||
import net.minecraft.entity.EnumCreatureType;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.util.IProgressUpdate;
|
|
||||||
import net.minecraft.world.ChunkPosition;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
|
||||||
import net.minecraft.world.chunk.Chunk;
|
|
||||||
import net.minecraft.world.chunk.IChunkProvider;
|
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
|
||||||
import net.minecraftforge.event.terraingen.ChunkProviderEvent;
|
|
||||||
import net.minecraftforge.event.terraingen.PopulateChunkEvent;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class ChunkProviderPromised implements IChunkProvider
|
|
||||||
{
|
|
||||||
private Random endRNG;
|
|
||||||
private RandomForcedPositive endRNG2;
|
|
||||||
private NoiseOctaves field_912_k;
|
|
||||||
private NoiseOctaves field_911_l;
|
|
||||||
private NoiseOctaves field_910_m;
|
|
||||||
private NoiseOctaves field_909_n;
|
|
||||||
private NoiseOctaves field_908_o;
|
|
||||||
public NoiseOctaves field_922_a;
|
|
||||||
public NoiseOctaves field_921_b;
|
|
||||||
private World endWorld;
|
|
||||||
private double[] densities;
|
|
||||||
|
|
||||||
private BiomeGenBase[] biomesForGeneration;
|
|
||||||
double field_4185_d[];
|
|
||||||
double field_4184_e[];
|
|
||||||
double field_4183_f[];
|
|
||||||
double field_4182_g[];
|
|
||||||
double field_4181_h[];
|
|
||||||
|
|
||||||
int[][] field_73203_h = new int[32][32];
|
|
||||||
|
|
||||||
public ChunkProviderPromised(World par1World, long par2)
|
|
||||||
{
|
|
||||||
endWorld = par1World;
|
|
||||||
endRNG = new Random(par2);
|
|
||||||
// prevent Random.nextInt(-1) crashes
|
|
||||||
this.endRNG2 = new RandomForcedPositive(par2);
|
|
||||||
field_912_k = new NoiseOctaves(endRNG, 16);
|
|
||||||
field_911_l = new NoiseOctaves(endRNG, 16);
|
|
||||||
field_910_m = new NoiseOctaves(endRNG, 8);
|
|
||||||
field_909_n = new NoiseOctaves(endRNG, 4);
|
|
||||||
field_908_o = new NoiseOctaves(endRNG, 4);
|
|
||||||
field_922_a = new NoiseOctaves(endRNG, 10);
|
|
||||||
field_921_b = new NoiseOctaves(endRNG, 16);
|
|
||||||
|
|
||||||
//NoiseGeneratorOctaves[] noiseGens = {noiseGen1, noiseGen2, noiseGen3, noiseGen4, noiseGen5};
|
|
||||||
//noiseGens = TerrainGen.getModdedNoiseGenerators(par1World, this.endRNG, noiseGens);
|
|
||||||
//this.noiseGen1 = noiseGens[0];
|
|
||||||
//this.noiseGen2 = noiseGens[1];
|
|
||||||
//this.noiseGen3 = noiseGens[2];
|
|
||||||
//this.noiseGen4 = noiseGens[3];
|
|
||||||
//this.noiseGen5 = noiseGens[4];
|
|
||||||
}
|
|
||||||
|
|
||||||
public void generateTerrain(int par1, int par2, Block[] par3ArrayOfByte, BiomeGenBase[] par4ArrayOfBiomeGenBase)
|
|
||||||
{
|
|
||||||
byte var5 = 2;
|
|
||||||
int var6 = var5 + 1;
|
|
||||||
byte var7 = 33;
|
|
||||||
int var8 = var5 + 1;
|
|
||||||
densities = this.initializeNoiseField(densities, par1 * var5, 0, par2 * var5, var6, var7, var8);
|
|
||||||
|
|
||||||
for (int var9 = 0; var9 < var5; ++var9)
|
|
||||||
{
|
|
||||||
for (int var10 = 0; var10 < var5; ++var10)
|
|
||||||
{
|
|
||||||
for (int var11 = 0; var11 < 32; ++var11)
|
|
||||||
{
|
|
||||||
double var12 = 0.25D;
|
|
||||||
double var14 = densities[((var9 + 0) * var8 + var10 + 0) * var7 + var11 + 0];
|
|
||||||
double var16 = densities[((var9 + 0) * var8 + var10 + 1) * var7 + var11 + 0];
|
|
||||||
double var18 = densities[((var9 + 1) * var8 + var10 + 0) * var7 + var11 + 0];
|
|
||||||
double var20 = densities[((var9 + 1) * var8 + var10 + 1) * var7 + var11 + 0];
|
|
||||||
double var22 = (densities[((var9 + 0) * var8 + var10 + 0) * var7 + var11 + 1] - var14) * var12;
|
|
||||||
double var24 = (densities[((var9 + 0) * var8 + var10 + 1) * var7 + var11 + 1] - var16) * var12;
|
|
||||||
double var26 = (densities[((var9 + 1) * var8 + var10 + 0) * var7 + var11 + 1] - var18) * var12;
|
|
||||||
double var28 = (densities[((var9 + 1) * var8 + var10 + 1) * var7 + var11 + 1] - var20) * var12;
|
|
||||||
|
|
||||||
for (int var30 = 0; var30 < 4; ++var30)
|
|
||||||
{
|
|
||||||
double var31 = 0.125D;
|
|
||||||
double var33 = var14;
|
|
||||||
double var35 = var16;
|
|
||||||
double var37 = (var18 - var14) * var31;
|
|
||||||
double var39 = (var20 - var16) * var31;
|
|
||||||
|
|
||||||
for (int var41 = 0; var41 < 8; ++var41)
|
|
||||||
{
|
|
||||||
int var42 = var41 + var9 * 8 << 11 | 0 + var10 * 8 << 7 | var11 * 4 + var30;
|
|
||||||
short var43 = 128;
|
|
||||||
double var44 = 0.125D;
|
|
||||||
double var46 = var33;
|
|
||||||
double var48 = (var35 - var33) * var44;
|
|
||||||
|
|
||||||
for (int var50 = 0; var50 < 8; ++var50)
|
|
||||||
{
|
|
||||||
Block var51 = Blocks.air;
|
|
||||||
|
|
||||||
if (var46 > 0.0D)
|
|
||||||
{
|
|
||||||
var51 = BOPBlockHelper.get("holyStone");
|
|
||||||
}
|
|
||||||
|
|
||||||
par3ArrayOfByte[var42] = var51;
|
|
||||||
var42 += var43;
|
|
||||||
var46 += var48;
|
|
||||||
}
|
|
||||||
|
|
||||||
var33 += var37;
|
|
||||||
var35 += var39;
|
|
||||||
}
|
|
||||||
|
|
||||||
var14 += var22;
|
|
||||||
var16 += var24;
|
|
||||||
var18 += var26;
|
|
||||||
var20 += var28;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void replaceBlocksForBiome(int par1, int par2, Block[] par3ArrayOfBlock, BiomeGenBase[] par4ArrayOfBiomeGenBase)
|
|
||||||
{
|
|
||||||
byte var98 = 63;
|
|
||||||
|
|
||||||
ChunkProviderEvent.ReplaceBiomeBlocks event = new ChunkProviderEvent.ReplaceBiomeBlocks(this, par1, par2, par3ArrayOfBlock, par4ArrayOfBiomeGenBase);
|
|
||||||
MinecraftForge.EVENT_BUS.post(event);
|
|
||||||
if (event.getResult() == Result.DENY) return;
|
|
||||||
|
|
||||||
for (int var5 = 0; var5 < 16; ++var5)
|
|
||||||
{
|
|
||||||
for (int var6 = 0; var6 < 16; ++var6)
|
|
||||||
{
|
|
||||||
BiomeGenBase biome = par4ArrayOfBiomeGenBase[var6 + var5 * 16];
|
|
||||||
byte var7 = 1;
|
|
||||||
int var8 = -1;
|
|
||||||
Block topBlock = biome.topBlock;
|
|
||||||
Block fillerBlock = biome.fillerBlock;
|
|
||||||
|
|
||||||
for (int var11 = 127; var11 >= 0; --var11)
|
|
||||||
{
|
|
||||||
int var12 = (var6 * 16 + var5) * 128 + var11;
|
|
||||||
Block var13 = par3ArrayOfBlock[var12];
|
|
||||||
|
|
||||||
if (var13 == Blocks.air)
|
|
||||||
{
|
|
||||||
var8 = -1;
|
|
||||||
}
|
|
||||||
else if (var13 == BOPBlockHelper.get("holyStone"))
|
|
||||||
{
|
|
||||||
if (var8 == -1)
|
|
||||||
{
|
|
||||||
if (var7 <= 0)
|
|
||||||
{
|
|
||||||
topBlock = Blocks.air;
|
|
||||||
fillerBlock = BOPBlockHelper.get("holyStone");
|
|
||||||
}
|
|
||||||
else if (var11 >= var98 - 4 && var11 <= var98 + 1)
|
|
||||||
{
|
|
||||||
topBlock = biome.topBlock;
|
|
||||||
fillerBlock = biome.fillerBlock;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (var11 < var98 && topBlock == Blocks.air)
|
|
||||||
{
|
|
||||||
topBlock = Blocks.water;
|
|
||||||
}
|
|
||||||
|
|
||||||
var8 = var7;
|
|
||||||
|
|
||||||
if (var11 >= 0)
|
|
||||||
{
|
|
||||||
par3ArrayOfBlock[var12] = topBlock;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
par3ArrayOfBlock[var12] = fillerBlock;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (var8 > 0)
|
|
||||||
{
|
|
||||||
--var8;
|
|
||||||
par3ArrayOfBlock[var12] = fillerBlock;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* loads or generates the chunk at the chunk location specified
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Chunk loadChunk(int par1, int par2)
|
|
||||||
{
|
|
||||||
return this.provideChunk(par1, par2);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Will return back a chunk, if it doesn't exist and its not a MP client it will generates all the blocks for the
|
|
||||||
* specified chunk from the map seed and chunk seed
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Chunk provideChunk(int par1, int par2)
|
|
||||||
{
|
|
||||||
endRNG.setSeed(par1 * 341873128712L + par2 * 132897987541L);
|
|
||||||
Block[] var3 = new Block[32768];
|
|
||||||
biomesForGeneration = endWorld.getWorldChunkManager().loadBlockGeneratorData(biomesForGeneration, par1 * 16, par2 * 16, 16, 16);
|
|
||||||
this.generateTerrain(par1, par2, var3, biomesForGeneration);
|
|
||||||
this.replaceBlocksForBiome(par1, par2, var3, biomesForGeneration);
|
|
||||||
Chunk var4 = new Chunk(endWorld, var3, par1, par2);
|
|
||||||
byte[] var5 = var4.getBiomeArray();
|
|
||||||
|
|
||||||
for (int var6 = 0; var6 < var5.length; ++var6)
|
|
||||||
{
|
|
||||||
var5[var6] = (byte)biomesForGeneration[var6].biomeID;
|
|
||||||
}
|
|
||||||
|
|
||||||
var4.generateSkylightMap();
|
|
||||||
return var4;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* generates a subset of the level's terrain data. Takes 7 arguments: the [empty] noise array, the position, and the
|
|
||||||
* size.
|
|
||||||
*/
|
|
||||||
|
|
||||||
private double[] initializeNoiseField(double ad[], int i, int j, int k, int l, int i1, int j1)
|
|
||||||
{
|
|
||||||
if(ad == null)
|
|
||||||
{
|
|
||||||
ad = new double[l * i1 * j1];
|
|
||||||
}
|
|
||||||
double d = 684.41200000000003D;
|
|
||||||
double d1 = 684.41200000000003D;
|
|
||||||
field_4182_g = field_922_a.generateNoiseOctaves(field_4182_g, i, k, l, j1, 1.121D, 1.121D, 0.5D);
|
|
||||||
field_4181_h = field_921_b.generateNoiseOctaves(field_4181_h, i, k, l, j1, 200D, 200D, 0.5D);
|
|
||||||
d *= 2D;
|
|
||||||
field_4185_d = field_910_m.generateNoiseOctaves(field_4185_d, i, j, k, l, i1, j1, d / 80D, d1 / 160D, d / 80D);
|
|
||||||
field_4184_e = field_912_k.generateNoiseOctaves(field_4184_e, i, j, k, l, i1, j1, d, d1, d);
|
|
||||||
field_4183_f = field_911_l.generateNoiseOctaves(field_4183_f, i, j, k, l, i1, j1, d, d1, d);
|
|
||||||
int k1 = 0;
|
|
||||||
int l1 = 0;
|
|
||||||
int i2 = 16 / l;
|
|
||||||
for(int j2 = 0; j2 < l; j2++)
|
|
||||||
{
|
|
||||||
int k2 = j2 * i2 + i2 / 2;
|
|
||||||
for(int l2 = 0; l2 < j1; l2++)
|
|
||||||
{
|
|
||||||
int i3 = l2 * i2 + i2 / 2;
|
|
||||||
double d3;
|
|
||||||
d3 = 0.5D;
|
|
||||||
double d4 = 1.0D - d3;
|
|
||||||
d4 *= d4;
|
|
||||||
d4 *= d4;
|
|
||||||
d4 = 1.0D - d4;
|
|
||||||
double d5 = (field_4182_g[l1] + 256D) / 512D;
|
|
||||||
d5 *= d4;
|
|
||||||
if(d5 > 1.0D)
|
|
||||||
{
|
|
||||||
d5 = 1.0D;
|
|
||||||
}
|
|
||||||
double d6 = field_4181_h[l1] / 8000D;
|
|
||||||
if(d6 < 0.0D)
|
|
||||||
{
|
|
||||||
d6 = -d6 * 0.29999999999999999D;
|
|
||||||
}
|
|
||||||
d6 = d6 * 3D - 2D;
|
|
||||||
if(d6 > 1.0D)
|
|
||||||
{
|
|
||||||
d6 = 1.0D;
|
|
||||||
}
|
|
||||||
d6 /= 8D;
|
|
||||||
d6 = 0.0D;
|
|
||||||
if(d5 < 0.0D)
|
|
||||||
{
|
|
||||||
d5 = 0.0D;
|
|
||||||
}
|
|
||||||
d5 += 0.5D;
|
|
||||||
d6 = (d6 * i1) / 16D;
|
|
||||||
l1++;
|
|
||||||
double d7 = i1 / 2D;
|
|
||||||
for(int j3 = 0; j3 < i1; j3++)
|
|
||||||
{
|
|
||||||
double d8 = 0.0D;
|
|
||||||
double d9 = ((j3 - d7) * 8D) / d5;
|
|
||||||
if(d9 < 0.0D)
|
|
||||||
{
|
|
||||||
d9 *= -1D;
|
|
||||||
}
|
|
||||||
double d10 = field_4184_e[k1] / 512D;
|
|
||||||
double d11 = field_4183_f[k1] / 512D;
|
|
||||||
double d12 = (field_4185_d[k1] / 10D + 1.0D) / 2D;
|
|
||||||
if(d12 < 0.0D)
|
|
||||||
{
|
|
||||||
d8 = d10;
|
|
||||||
} else
|
|
||||||
if(d12 > 1.0D)
|
|
||||||
{
|
|
||||||
d8 = d11;
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
d8 = d10 + (d11 - d10) * d12;
|
|
||||||
}
|
|
||||||
d8 -= 8D;
|
|
||||||
int k3 = 32;
|
|
||||||
if(j3 > i1 - k3)
|
|
||||||
{
|
|
||||||
double d13 = (j3 - (i1 - k3)) / (k3 - 1.0F);
|
|
||||||
d8 = d8 * (1.0D - d13) + -30D * d13;
|
|
||||||
}
|
|
||||||
k3 = 8;
|
|
||||||
if(j3 < k3)
|
|
||||||
{
|
|
||||||
double d14 = (k3 - j3) / (k3 - 1.0F);
|
|
||||||
d8 = d8 * (1.0D - d14) + -30D * d14;
|
|
||||||
}
|
|
||||||
ad[k1] = d8;
|
|
||||||
k1++;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return ad;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
private double[] initializeNoiseField(double[] par1ArrayOfDouble, int par2, int par3, int par4, int par5, int par6, int par7)
|
|
||||||
{
|
|
||||||
ChunkProviderEvent.InitNoiseField event = new ChunkProviderEvent.InitNoiseField(this, par1ArrayOfDouble, par2, par3, par4, par5, par6, par7);
|
|
||||||
MinecraftForge.EVENT_BUS.post(event);
|
|
||||||
if (event.getResult() == Result.DENY) return event.noisefield;
|
|
||||||
|
|
||||||
if (par1ArrayOfDouble == null)
|
|
||||||
{
|
|
||||||
par1ArrayOfDouble = new double[par5 * par6 * par7];
|
|
||||||
}
|
|
||||||
|
|
||||||
double var8 = 684.412D;
|
|
||||||
double var10 = 684.412D;
|
|
||||||
this.noiseData4 = this.noiseGen4.generateNoiseOctaves(this.noiseData4, par2, par4, par5, par7, 1.121D, 1.121D, 0.5D);
|
|
||||||
this.noiseData5 = this.noiseGen5.generateNoiseOctaves(this.noiseData5, par2, par4, par5, par7, 200.0D, 200.0D, 0.5D);
|
|
||||||
var8 *= 2.0D;
|
|
||||||
this.noiseData1 = this.noiseGen3.generateNoiseOctaves(this.noiseData1, par2, par3, par4, par5, par6, par7, var8 / 80.0D, var10 / 160.0D, var8 / 80.0D);
|
|
||||||
this.noiseData2 = this.noiseGen1.generateNoiseOctaves(this.noiseData2, par2, par3, par4, par5, par6, par7, var8, var10, var8);
|
|
||||||
this.noiseData3 = this.noiseGen2.generateNoiseOctaves(this.noiseData3, par2, par3, par4, par5, par6, par7, var8, var10, var8);
|
|
||||||
int var12 = 0;
|
|
||||||
int var13 = 0;
|
|
||||||
|
|
||||||
for (int var14 = 0; var14 < par5; ++var14)
|
|
||||||
{
|
|
||||||
for (int var15 = 0; var15 < par7; ++var15)
|
|
||||||
{
|
|
||||||
double var16 = (this.noiseData4[var13] + 256.0D) / 512.0D;
|
|
||||||
|
|
||||||
if (var16 > 1.0D)
|
|
||||||
{
|
|
||||||
var16 = 1.0D;
|
|
||||||
}
|
|
||||||
|
|
||||||
double var18 = this.noiseData5[var13] / 8000.0D;
|
|
||||||
|
|
||||||
if (var18 < 0.0D)
|
|
||||||
{
|
|
||||||
var18 = -var18 * 0.3D;
|
|
||||||
}
|
|
||||||
|
|
||||||
var18 = var18 * 3.0D - 2.0D;
|
|
||||||
float var20 = (float)(var14 + par2 - 0) / 1.0F;
|
|
||||||
float var21 = (float)(var15 + par4 - 0) / 1.0F;
|
|
||||||
float var22 = 100.0F - MathHelper.sqrt_float(var20 * var20 + var21 * var21) * 8.0F;
|
|
||||||
|
|
||||||
if (var22 > 80.0F)
|
|
||||||
{
|
|
||||||
var22 = 80.0F;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (var22 < -100.0F)
|
|
||||||
{
|
|
||||||
var22 = -100.0F;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (var18 > 1.0D)
|
|
||||||
{
|
|
||||||
var18 = 1.0D;
|
|
||||||
}
|
|
||||||
|
|
||||||
var18 /= 8.0D;
|
|
||||||
var18 = 0.0D;
|
|
||||||
|
|
||||||
if (var16 < 0.0D)
|
|
||||||
{
|
|
||||||
var16 = 0.0D;
|
|
||||||
}
|
|
||||||
|
|
||||||
var16 += 0.5D;
|
|
||||||
var18 = var18 * (double)par6 / 16.0D;
|
|
||||||
++var13;
|
|
||||||
double var23 = (double)par6 / 2.0D;
|
|
||||||
|
|
||||||
for (int var25 = 0; var25 < par6; ++var25)
|
|
||||||
{
|
|
||||||
double var26 = 0.0D;
|
|
||||||
double var28 = ((double)var25 - var23) * 8.0D / var16;
|
|
||||||
|
|
||||||
if (var28 < 0.0D)
|
|
||||||
{
|
|
||||||
var28 *= -1.0D;
|
|
||||||
}
|
|
||||||
|
|
||||||
double var30 = this.noiseData2[var12] / 512.0D;
|
|
||||||
double var32 = this.noiseData3[var12] / 512.0D;
|
|
||||||
double var34 = (this.noiseData1[var12] / 10.0D + 1.0D) / 2.0D;
|
|
||||||
|
|
||||||
if (var34 < 0.0D)
|
|
||||||
{
|
|
||||||
var26 = var30;
|
|
||||||
}
|
|
||||||
else if (var34 > 1.0D)
|
|
||||||
{
|
|
||||||
var26 = var32;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var26 = var30 + (var32 - var30) * var34;
|
|
||||||
}
|
|
||||||
|
|
||||||
var26 -= 8.0D;
|
|
||||||
var26 += (double)var22;
|
|
||||||
byte var36 = 2;
|
|
||||||
double var37;
|
|
||||||
|
|
||||||
if (var25 > par6 / 2 - var36)
|
|
||||||
{
|
|
||||||
var37 = (double)((float)(var25 - (par6 / 2 - var36)) / 64.0F);
|
|
||||||
|
|
||||||
if (var37 < 0.0D)
|
|
||||||
{
|
|
||||||
var37 = 0.0D;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (var37 > 1.0D)
|
|
||||||
{
|
|
||||||
var37 = 1.0D;
|
|
||||||
}
|
|
||||||
|
|
||||||
var26 = var26 * (1.0D - var37) + -3000.0D * var37;
|
|
||||||
}
|
|
||||||
|
|
||||||
var36 = 8;
|
|
||||||
|
|
||||||
if (var25 < var36)
|
|
||||||
{
|
|
||||||
var37 = (double)((float)(var36 - var25) / ((float)var36 - 1.0F));
|
|
||||||
var26 = var26 * (1.0D - var37) + -30.0D * var37;
|
|
||||||
}
|
|
||||||
|
|
||||||
par1ArrayOfDouble[var12] = var26;
|
|
||||||
++var12;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return par1ArrayOfDouble;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks to see if a chunk exists at x, y
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean chunkExists(int par1, int par2)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Populates chunk with ores etc etc
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
|
|
||||||
{
|
|
||||||
BlockSand.fallInstantly = true;
|
|
||||||
|
|
||||||
MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(par1IChunkProvider, endWorld, endRNG2, par2, par3, false));
|
|
||||||
|
|
||||||
int var4 = par2 * 16;
|
|
||||||
int var5 = par3 * 16;
|
|
||||||
BiomeGenBase var6 = endWorld.getBiomeGenForCoords(var4 + 16, var5 + 16);
|
|
||||||
|
|
||||||
for (int a = 0; a < 25; ++a)
|
|
||||||
{
|
|
||||||
int x = var4 + endWorld.rand.nextInt(16);
|
|
||||||
int y = endWorld.rand.nextInt(30) + 30;
|
|
||||||
int z = var5 + endWorld.rand.nextInt(16);
|
|
||||||
Block b = endWorld.getBlock(x, y, z);
|
|
||||||
|
|
||||||
if (b == BOPBlockHelper.get("holyStone"))
|
|
||||||
{
|
|
||||||
endWorld.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 0, 2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var6.decorate(endWorld, endRNG2, var4, var5);
|
|
||||||
|
|
||||||
MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(par1IChunkProvider, endWorld, endRNG2, par2, par3, false));
|
|
||||||
|
|
||||||
BlockSand.fallInstantly = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Two modes of operation: if passed true, save all Chunks in one go. If passed false, save up to two chunks.
|
|
||||||
* Return true if all chunks have been saved.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean saveChunks(boolean par1, IProgressUpdate par2IProgressUpdate)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unloads the 100 oldest chunks from memory, due to a bug with chunkSet.add() never being called it thinks the list
|
|
||||||
* is always empty and will not remove any chunks.
|
|
||||||
*/
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean unloadQueuedChunks()
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean unload100OldestChunks()
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns if the IChunkProvider supports saving.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean canSave()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts the instance data to a readable string.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public String makeString()
|
|
||||||
{
|
|
||||||
return "RandomLevelSource";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a list of creatures of the specified type that can spawn at the given location.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
@SuppressWarnings("rawtypes")
|
|
||||||
public List getPossibleCreatures(EnumCreatureType par1EnumCreatureType, int par2, int par3, int par4)
|
|
||||||
{
|
|
||||||
BiomeGenBase var5 = endWorld.getBiomeGenForCoords(par2, par4);
|
|
||||||
return var5 == null ? null : var5.getSpawnableList(par1EnumCreatureType);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the location of the closest structure of the specified type. If not found returns null.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
//TODO: findClosestStructure
|
|
||||||
public ChunkPosition func_147416_a(World par1World, String par2Str, int par3, int par4, int par5)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getLoadedChunkCount()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void recreateStructures(int par1, int par2) {}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void saveExtraData()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,262 +0,0 @@
|
||||||
package biomesoplenty.common.world;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.world.ChunkPosition;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.WorldType;
|
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
|
||||||
import net.minecraft.world.biome.WorldChunkManager;
|
|
||||||
import net.minecraft.world.gen.layer.GenLayer;
|
|
||||||
import net.minecraft.world.gen.layer.IntCache;
|
|
||||||
import biomesoplenty.common.helpers.BiomeCachePromised;
|
|
||||||
import biomesoplenty.common.world.layer.GenLayerCustom;
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
|
|
||||||
public class WorldChunkManagerPromised extends WorldChunkManager
|
|
||||||
{
|
|
||||||
private GenLayer genBiomes;
|
|
||||||
private GenLayer biomeIndexLayer;
|
|
||||||
private BiomeCachePromised biomeCache;
|
|
||||||
|
|
||||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
|
||||||
protected WorldChunkManagerPromised()
|
|
||||||
{
|
|
||||||
biomeCache = new BiomeCachePromised(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public WorldChunkManagerPromised(long seed, WorldType worldType)
|
|
||||||
{
|
|
||||||
this();
|
|
||||||
//GenLayer[] var4 = BiomeLayer.initializeAllBiomeGenerators(par1, par3WorldType, 2);
|
|
||||||
GenLayer[] agenlayer = GenLayerCustom.makeTheWorld(seed, worldType);
|
|
||||||
genBiomes = agenlayer[0];
|
|
||||||
biomeIndexLayer = agenlayer[1];
|
|
||||||
}
|
|
||||||
|
|
||||||
public WorldChunkManagerPromised(World par1World)
|
|
||||||
{
|
|
||||||
this(par1World.getSeed(), par1World.getWorldInfo().getTerrainType());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BiomeGenBase getBiomeGenAt(int par1, int par2)
|
|
||||||
{
|
|
||||||
return biomeCache.getBiomeGenAt(par1, par2);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public float[] getRainfall(float[] par1ArrayOfFloat, int par2, int par3, int par4, int par5)
|
|
||||||
{
|
|
||||||
IntCache.resetIntCache();
|
|
||||||
|
|
||||||
if (par1ArrayOfFloat == null || par1ArrayOfFloat.length < par4 * par5)
|
|
||||||
{
|
|
||||||
par1ArrayOfFloat = new float[par4 * par5];
|
|
||||||
}
|
|
||||||
|
|
||||||
int[] var6 = biomeIndexLayer.getInts(par2, par3, par4, par5);
|
|
||||||
|
|
||||||
for (int var7 = 0; var7 < par4 * par5; ++var7)
|
|
||||||
{
|
|
||||||
float var8 = BiomeGenBase.getBiomeGenArray()[var6[var7]].getIntRainfall() / 65536.0F;
|
|
||||||
|
|
||||||
if (var8 > 1.0F)
|
|
||||||
{
|
|
||||||
var8 = 1.0F;
|
|
||||||
}
|
|
||||||
|
|
||||||
par1ArrayOfFloat[var7] = var8;
|
|
||||||
}
|
|
||||||
|
|
||||||
return par1ArrayOfFloat;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return an adjusted version of a given temperature based on the y height
|
|
||||||
*/
|
|
||||||
public float getTemperatureAtHeight(float par1, int par2)
|
|
||||||
{
|
|
||||||
return par1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a list of temperatures to use for the specified blocks. Args: listToReuse, x, y, width, length
|
|
||||||
*/
|
|
||||||
//@Override
|
|
||||||
public float[] getTemperatures(float[] par1ArrayOfFloat, int par2, int par3, int par4, int par5)
|
|
||||||
{
|
|
||||||
IntCache.resetIntCache();
|
|
||||||
|
|
||||||
if (par1ArrayOfFloat == null || par1ArrayOfFloat.length < par4 * par5)
|
|
||||||
{
|
|
||||||
par1ArrayOfFloat = new float[par4 * par5];
|
|
||||||
}
|
|
||||||
|
|
||||||
int[] var6 = biomeIndexLayer.getInts(par2, par3, par4, par5);
|
|
||||||
|
|
||||||
for (int var7 = 0; var7 < par4 * par5; ++var7)
|
|
||||||
{
|
|
||||||
float var8 = BiomeGenBase.getBiomeGenArray()[var6[var7]].temperature / 65536.0F;
|
|
||||||
|
|
||||||
if (var8 > 1.0F)
|
|
||||||
{
|
|
||||||
var8 = 1.0F;
|
|
||||||
}
|
|
||||||
|
|
||||||
par1ArrayOfFloat[var7] = var8;
|
|
||||||
}
|
|
||||||
|
|
||||||
return par1ArrayOfFloat;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an array of biomes for the location input.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public BiomeGenBase[] getBiomesForGeneration(BiomeGenBase[] par1ArrayOfBiomeGenBase, int par2, int par3, int par4, int par5)
|
|
||||||
{
|
|
||||||
IntCache.resetIntCache();
|
|
||||||
|
|
||||||
if (par1ArrayOfBiomeGenBase == null || par1ArrayOfBiomeGenBase.length < par4 * par5)
|
|
||||||
{
|
|
||||||
par1ArrayOfBiomeGenBase = new BiomeGenBase[par4 * par5];
|
|
||||||
}
|
|
||||||
|
|
||||||
int[] var6 = genBiomes.getInts(par2, par3, par4, par5);
|
|
||||||
|
|
||||||
for (int var7 = 0; var7 < par4 * par5; ++var7)
|
|
||||||
{
|
|
||||||
par1ArrayOfBiomeGenBase[var7] = BiomeGenBase.getBiomeGenArray()[var6[var7]];
|
|
||||||
}
|
|
||||||
|
|
||||||
return par1ArrayOfBiomeGenBase;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns biomes to use for the blocks and loads the other data like temperature and humidity onto the
|
|
||||||
* WorldChunkManager Args: oldBiomeList, x, z, width, depth
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public BiomeGenBase[] loadBlockGeneratorData(BiomeGenBase[] par1ArrayOfBiomeGenBase, int par2, int par3, int par4, int par5)
|
|
||||||
{
|
|
||||||
return this.getBiomeGenAt(par1ArrayOfBiomeGenBase, par2, par3, par4, par5, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return a list of biomes for the specified blocks. Args: listToReuse, x, y, width, length, cacheFlag (if false,
|
|
||||||
* don't check biomeCache to avoid infinite loop in BiomeCacheBlock)
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public BiomeGenBase[] getBiomeGenAt(BiomeGenBase[] par1ArrayOfBiomeGenBase, int par2, int par3, int par4, int par5, boolean par6)
|
|
||||||
{
|
|
||||||
IntCache.resetIntCache();
|
|
||||||
|
|
||||||
if (par1ArrayOfBiomeGenBase == null || par1ArrayOfBiomeGenBase.length < par4 * par5)
|
|
||||||
{
|
|
||||||
par1ArrayOfBiomeGenBase = new BiomeGenBase[par4 * par5];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (par6 && par4 == 16 && par5 == 16 && (par2 & 15) == 0 && (par3 & 15) == 0)
|
|
||||||
{
|
|
||||||
BiomeGenBase[] var9 = biomeCache.getCachedBiomes(par2, par3);
|
|
||||||
System.arraycopy(var9, 0, par1ArrayOfBiomeGenBase, 0, par4 * par5);
|
|
||||||
return par1ArrayOfBiomeGenBase;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
int[] var7 = biomeIndexLayer.getInts(par2, par3, par4, par5);
|
|
||||||
|
|
||||||
for (int var8 = 0; var8 < par4 * par5; ++var8)
|
|
||||||
{
|
|
||||||
par1ArrayOfBiomeGenBase[var8] = BiomeGenBase.getBiomeGenArray()[var7[var8]];
|
|
||||||
}
|
|
||||||
|
|
||||||
return par1ArrayOfBiomeGenBase;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* checks given Chunk's Biomes against List of allowed ones
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
@SuppressWarnings("rawtypes")
|
|
||||||
public boolean areBiomesViable(int par1, int par2, int par3, List par4List)
|
|
||||||
{
|
|
||||||
IntCache.resetIntCache();
|
|
||||||
int var5 = par1 - par3 >> 2;
|
|
||||||
int var6 = par2 - par3 >> 2;
|
|
||||||
int var7 = par1 + par3 >> 2;
|
|
||||||
int var8 = par2 + par3 >> 2;
|
|
||||||
int var9 = var7 - var5 + 1;
|
|
||||||
int var10 = var8 - var6 + 1;
|
|
||||||
int[] var11 = genBiomes.getInts(var5, var6, var9, var10);
|
|
||||||
|
|
||||||
for (int var12 = 0; var12 < var9 * var10; ++var12)
|
|
||||||
{
|
|
||||||
BiomeGenBase var13 = BiomeGenBase.getBiomeGenArray()[var11[var12]];
|
|
||||||
|
|
||||||
if (!par4List.contains(var13))
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Finds a valid position within a range, that is in one of the listed biomes. Searches {par1,par2} +-par3 blocks.
|
|
||||||
* Strongly favors positive y positions.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
@SuppressWarnings("rawtypes")
|
|
||||||
//TODO: findBiomePosition
|
|
||||||
public ChunkPosition findBiomePosition(int par1, int par2, int par3, List par4List, Random par5Random)
|
|
||||||
{
|
|
||||||
IntCache.resetIntCache();
|
|
||||||
int var6 = par1 - par3 >> 2;
|
|
||||||
int var7 = par2 - par3 >> 2;
|
|
||||||
int var8 = par1 + par3 >> 2;
|
|
||||||
int var9 = par2 + par3 >> 2;
|
|
||||||
int var10 = var8 - var6 + 1;
|
|
||||||
int var11 = var9 - var7 + 1;
|
|
||||||
int[] var12 = genBiomes.getInts(var6, var7, var10, var11);
|
|
||||||
ChunkPosition var13 = null;
|
|
||||||
int var14 = 0;
|
|
||||||
|
|
||||||
for (int var15 = 0; var15 < var10 * var11; ++var15)
|
|
||||||
{
|
|
||||||
int var16 = var6 + var15 % var10 << 2;
|
|
||||||
int var17 = var7 + var15 / var10 << 2;
|
|
||||||
BiomeGenBase var18 = BiomeGenBase.getBiomeGenArray()[var12[var15]];
|
|
||||||
|
|
||||||
if (par4List.contains(var18) && (var13 == null || par5Random.nextInt(var14 + 1) == 0))
|
|
||||||
{
|
|
||||||
var13 = new ChunkPosition(var16, 0, var17);
|
|
||||||
++var14;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return var13;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Calls the WorldChunkManager's biomeCache.cleanupCache()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void cleanupCache()
|
|
||||||
{
|
|
||||||
biomeCache.cleanupCache();
|
|
||||||
}
|
|
||||||
|
|
||||||
//public GenLayer[] getModdedBiomeGenerators(WorldType worldType, long seed, GenLayer[] original)
|
|
||||||
//{
|
|
||||||
// WorldTypeEvent.InitBiomeGens event = new WorldTypeEvent.InitBiomeGens(worldType, seed, original);
|
|
||||||
// MinecraftForge.TERRAIN_GEN_BUS.post(event);
|
|
||||||
// return event.newBiomeGens;
|
|
||||||
//}
|
|
||||||
}
|
|
|
@ -1,185 +0,0 @@
|
||||||
package biomesoplenty.common.world;
|
|
||||||
|
|
||||||
import static biomesoplenty.common.configuration.BOPConfigurationIDs.promisedLandDimID;
|
|
||||||
|
|
||||||
import org.apache.logging.log4j.Level;
|
|
||||||
|
|
||||||
import biomesoplenty.api.BOPBiomeHelper;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
|
||||||
import biomesoplenty.common.configuration.BOPConfigurationIDs;
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.client.multiplayer.WorldClient;
|
|
||||||
import net.minecraft.util.ChunkCoordinates;
|
|
||||||
import net.minecraft.util.MathHelper;
|
|
||||||
import net.minecraft.util.Vec3;
|
|
||||||
import net.minecraft.world.WorldProvider;
|
|
||||||
import net.minecraft.world.WorldSettings.GameType;
|
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
|
||||||
import net.minecraft.world.chunk.IChunkProvider;
|
|
||||||
import net.minecraft.world.gen.ChunkProviderEnd;
|
|
||||||
import net.minecraft.world.storage.WorldInfo;
|
|
||||||
import net.minecraftforge.common.DimensionManager;
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
|
|
||||||
public class WorldProviderPromised extends WorldProvider
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public void setDimension (int dim)
|
|
||||||
{
|
|
||||||
this.dimensionId = dim;
|
|
||||||
super.setDimension(dim);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public long getSeed ()
|
|
||||||
{
|
|
||||||
Long seed = super.getSeed();
|
|
||||||
return seed;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public IChunkProvider createChunkGenerator()
|
|
||||||
{
|
|
||||||
return new ChunkProviderPromised(worldObj, worldObj.getSeed());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void registerWorldChunkManager()
|
|
||||||
{
|
|
||||||
worldChunkMgr = new WorldChunkManagerPromised(worldObj);
|
|
||||||
|
|
||||||
dimensionId = BOPConfigurationIDs.promisedLandDimID;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getWelcomeMessage()
|
|
||||||
{
|
|
||||||
if (this instanceof WorldProviderPromised)
|
|
||||||
{
|
|
||||||
return "Entering the " + getDimensionName();
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getDepartMessage()
|
|
||||||
{
|
|
||||||
if (this instanceof WorldProviderPromised)
|
|
||||||
{
|
|
||||||
return "Leaving the " +getDimensionName();
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getDimensionName() {
|
|
||||||
return "Promised Land";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canRespawnHere()
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public double getMovementFactor()
|
|
||||||
{
|
|
||||||
return 16.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public float calculateCelestialAngle(long par1, float par3)
|
|
||||||
{
|
|
||||||
return 1.0F;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public float getCloudHeight()
|
|
||||||
{
|
|
||||||
return 0.0F;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canCoordinateBeSpawn(int par1, int par2)
|
|
||||||
{
|
|
||||||
Block var3 = worldObj.getTopBlock(par1, par2);
|
|
||||||
return var3 == BOPBlockHelper.get("grass");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ChunkCoordinates getEntrancePortalLocation()
|
|
||||||
{
|
|
||||||
return new ChunkCoordinates(100, 50, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getAverageGroundLevel()
|
|
||||||
{
|
|
||||||
return 64;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public double getHorizon()
|
|
||||||
{
|
|
||||||
return 0.0D;
|
|
||||||
}
|
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public boolean hasVoidParticles(boolean var1)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public boolean isSkyColored()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public double getVoidFogYFactor()
|
|
||||||
{
|
|
||||||
return 1.0D;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public Vec3 getFogColor(float par1, float par2)
|
|
||||||
{
|
|
||||||
float var3 = MathHelper.cos(par1 * (float)Math.PI * 2.0F) * 2.0F + 0.5F;
|
|
||||||
|
|
||||||
if (var3 < 0.0F)
|
|
||||||
{
|
|
||||||
var3 = 0.0F;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (var3 > 1.0F)
|
|
||||||
{
|
|
||||||
var3 = 1.0F;
|
|
||||||
}
|
|
||||||
|
|
||||||
float var4 = 1.0F;
|
|
||||||
float var5 = 0.73725490196F;
|
|
||||||
float var6 = 0.25882352941F;
|
|
||||||
var4 *= var3 * 3.94F + 0.06F;
|
|
||||||
var5 *= var3 * 0.94F + 0.06F;
|
|
||||||
var6 *= var3 * 0.91F + 0.09F;
|
|
||||||
return worldObj.getWorldVec3Pool().getVecFromPool(var4, var5, var6);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setAllowedSpawnTypes(boolean allowHostile, boolean allowPeaceful)
|
|
||||||
{
|
|
||||||
allowPeaceful = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
//@Override
|
|
||||||
//public IChunkProvider createChunkGenerator()
|
|
||||||
//{
|
|
||||||
// return new ChunkProviderPromised(worldObj, worldObj.getSeed());
|
|
||||||
//}
|
|
||||||
}
|
|
|
@ -1,98 +0,0 @@
|
||||||
package biomesoplenty.common.world.decoration;
|
|
||||||
|
|
||||||
import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.FLOWERS;
|
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import biomesoplenty.common.world.generation.ForcedBOPWorldGenerators;
|
|
||||||
import biomesoplenty.common.world.generation.IWorldGeneratorBOP;
|
|
||||||
import biomesoplenty.common.world.generation.WorldGenFieldAssociation;
|
|
||||||
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.biome.BiomeDecorator;
|
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import net.minecraftforge.event.terraingen.TerrainGen;
|
|
||||||
|
|
||||||
public class BOPBiomeDecorator extends BiomeDecorator
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public void decorateChunk(World world, Random random, BiomeGenBase biome, int chunk_X, int chunk_Z)
|
|
||||||
{
|
|
||||||
if (this.currentWorld == null)
|
|
||||||
{
|
|
||||||
this.currentWorld = world;
|
|
||||||
this.randomGenerator = random;
|
|
||||||
this.chunk_X = chunk_X;
|
|
||||||
this.chunk_Z = chunk_Z;
|
|
||||||
this.genDecorations(biome);
|
|
||||||
this.currentWorld = null;
|
|
||||||
this.randomGenerator = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void genDecorations(BiomeGenBase biome)
|
|
||||||
{
|
|
||||||
doBOPDecoration(biome);
|
|
||||||
super.genDecorations(biome);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void doBOPDecoration(BiomeGenBase biome)
|
|
||||||
{
|
|
||||||
IBOPDecoration bopDecoration = null;
|
|
||||||
|
|
||||||
if (biome instanceof IBOPDecoration)
|
|
||||||
{
|
|
||||||
bopDecoration = (IBOPDecoration)biome;
|
|
||||||
}
|
|
||||||
else if (ForcedDecorators.biomeHasForcedDecorator(biome.biomeID))
|
|
||||||
{
|
|
||||||
bopDecoration = ForcedDecorators.getForcedDecorator(biome.biomeID);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bopDecoration != null)
|
|
||||||
{
|
|
||||||
for (Field worldGeneratorField : BOPWorldFeatures.class.getFields())
|
|
||||||
{
|
|
||||||
WorldGenerator worldGenerator = null;
|
|
||||||
|
|
||||||
if (worldGeneratorField.getName().equals("bopFlowersPerChunk") && TerrainGen.decorate(this.currentWorld, this.randomGenerator, this.chunk_X, this.chunk_Z, FLOWERS))
|
|
||||||
{
|
|
||||||
worldGenerator = bopDecoration.getRandomWorldGenForBOPFlowers(this.randomGenerator);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
worldGenerator = WorldGenFieldAssociation.getAssociatedWorldGenerator(worldGeneratorField.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (worldGenerator != null)
|
|
||||||
{
|
|
||||||
IWorldGeneratorBOP worldGeneratorBOP = null;
|
|
||||||
|
|
||||||
if (worldGenerator instanceof IWorldGeneratorBOP)
|
|
||||||
{
|
|
||||||
worldGeneratorBOP = (IWorldGeneratorBOP)worldGenerator;
|
|
||||||
}
|
|
||||||
else if (ForcedBOPWorldGenerators.hasForcedGenerator(worldGenerator.getClass()))
|
|
||||||
{
|
|
||||||
worldGeneratorBOP = ForcedBOPWorldGenerators.getForcedGenerator(worldGenerator.getClass());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (worldGeneratorBOP != null)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
worldGeneratorBOP.doGeneration(this.currentWorld, this.randomGenerator, worldGeneratorField, worldGenerator, biome, bopDecoration, this.chunk_X, this.chunk_Z);
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,53 @@
|
||||||
|
package biomesoplenty.common.world.decoration;
|
||||||
|
|
||||||
|
import biomesoplenty.common.world.generation.IBOPWorldGenerator;
|
||||||
|
import biomesoplenty.common.world.generation.WorldGenFieldAssociation;
|
||||||
|
import cpw.mods.fml.common.IWorldGenerator;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.biome.BiomeGenBase;
|
||||||
|
import net.minecraft.world.chunk.IChunkProvider;
|
||||||
|
import net.minecraftforge.event.terraingen.DecorateBiomeEvent;
|
||||||
|
import net.minecraftforge.event.terraingen.TerrainGen;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
public class BOPDecorationManager implements IWorldGenerator
|
||||||
|
{
|
||||||
|
private static BOPWorldFeatures[] biomeFeaturesMap = new BOPWorldFeatures[BiomeGenBase.getBiomeGenArray().length];
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider)
|
||||||
|
{
|
||||||
|
chunkX <<= 4;
|
||||||
|
chunkZ <<= 4;
|
||||||
|
|
||||||
|
BiomeGenBase biome = world.getBiomeGenForCoords(chunkX, chunkZ);
|
||||||
|
BOPWorldFeatures biomeFeatures = getBiomeFeatures(biome.biomeID);
|
||||||
|
|
||||||
|
for (String featureName : biomeFeatures.getFeatureNames())
|
||||||
|
{
|
||||||
|
if (featureName.equals("bopFlowersPerChunk"))
|
||||||
|
{
|
||||||
|
if (!TerrainGen.decorate(world, random, chunkX, chunkZ, DecorateBiomeEvent.Decorate.EventType.FLOWERS)) continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
WorldGenFieldAssociation.WorldFeature worldFeature = WorldGenFieldAssociation.getAssociatedFeature(featureName);
|
||||||
|
|
||||||
|
if (worldFeature != null)
|
||||||
|
{
|
||||||
|
IBOPWorldGenerator worldGenerator = worldFeature.getBOPWorldGenerator();
|
||||||
|
|
||||||
|
if (worldGenerator != null)
|
||||||
|
{
|
||||||
|
worldGenerator.setupGeneration(world, random, biome, featureName, chunkX, chunkZ);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static BOPWorldFeatures getBiomeFeatures(int biomeID)
|
||||||
|
{
|
||||||
|
if (biomeFeaturesMap[biomeID] == null) return biomeFeaturesMap[biomeID] = new BOPWorldFeatures();
|
||||||
|
else return biomeFeaturesMap[biomeID];
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,64 +1,94 @@
|
||||||
package biomesoplenty.common.world.decoration;
|
package biomesoplenty.common.world.decoration;
|
||||||
|
|
||||||
|
import biomesoplenty.common.world.generation.WorldGenFieldAssociation;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
public class BOPWorldFeatures
|
public class BOPWorldFeatures
|
||||||
{
|
{
|
||||||
public boolean generatePumpkins = true;
|
private HashMap<String, Object> featureValueMap = new HashMap<String, Object>();
|
||||||
public boolean generateQuicksand = false;
|
|
||||||
public boolean generateCanyon = false;
|
|
||||||
public boolean generateStoneInGrass = false;
|
|
||||||
public boolean generateStoneInGrass2 = false;
|
|
||||||
public boolean generateGrass = false;
|
|
||||||
public boolean generateSand = false;
|
|
||||||
public boolean generateQuagmire = false;
|
|
||||||
public boolean generateAsh = false;
|
|
||||||
public boolean generateMelons = false;
|
|
||||||
|
|
||||||
public int waterPoolsPerChunk = 50;
|
static
|
||||||
public int lavaPoolsPerChunk = 20;
|
{
|
||||||
|
WorldGenFieldAssociation.init();
|
||||||
public int waterLakesPerChunk = 0;
|
}
|
||||||
public int lavaLakesPerChunk = 0;
|
|
||||||
|
protected BOPWorldFeatures()
|
||||||
public int mudPerChunk = 0;
|
{
|
||||||
public int riverCanePerChunk = 0;
|
setFeature("generatePumpkins", true);
|
||||||
public int shrubsPerChunk = 0;
|
setFeature("generateQuicksand", false);
|
||||||
public int bushesPerChunk = 0;
|
setFeature("generateCanyon", false);
|
||||||
public int cloverPatchesPerChunk = 0;
|
setFeature("generateStoneInGrass", false);
|
||||||
public int seaweedPerChunk = 0;
|
setFeature("generateStoneInGrass2", false);
|
||||||
public int leafPilesPerChunk = 0;
|
setFeature("generateGrass", false);
|
||||||
public int deadLeafPilesPerChunk = 0;
|
setFeature("generateSand", false);
|
||||||
public int lavenderPerChunk = 0;
|
setFeature("generateQuagmire", false);
|
||||||
public int thornsPerChunk = 0;
|
setFeature("generateAsh", false);
|
||||||
public int stalagmitesPerChunk = 3;
|
setFeature("generateMelons", false);
|
||||||
public int stalactitesPerChunk = 6;
|
|
||||||
public int desertSproutsPerChunk = 0;
|
setFeature("waterPoolsPerChunk", 50);
|
||||||
public int bromeliadsPerChunk = 0;
|
setFeature("lavaPoolsPerChunk", 20);
|
||||||
public int waterReedsPerChunk = 0;
|
|
||||||
public int wildCarrotsPerChunk = 0;
|
setFeature("waterLakesPerChunk", 0);
|
||||||
public int poisonIvyPerChunk = 0;
|
setFeature("lavaLakesPerChunk", 0);
|
||||||
public int berryBushesPerChunk = 0;
|
|
||||||
public int portobellosPerChunk = 0;
|
setFeature("mudPerChunk", 0);
|
||||||
public int koruPerChunk = 0;
|
setFeature("riverCanePerChunk", 0);
|
||||||
public int toadstoolsPerChunk = 0;
|
setFeature("shrubsPerChunk", 0);
|
||||||
public int blueMilksPerChunk = 0;
|
setFeature("bushesPerChunk", 0);
|
||||||
public int cattailsPerChunk = 0;
|
setFeature("cloverPatchesPerChunk", 0);
|
||||||
public int highCattailsPerChunk = 0;
|
setFeature("seaweedPerChunk", 0);
|
||||||
public int algaePerChunk = 0;
|
setFeature("leafPilesPerChunk", 0);
|
||||||
public int sproutsPerChunk = 0;
|
setFeature("deadLeafPilesPerChunk", 0);
|
||||||
public int tinyCactiPerChunk = 0;
|
setFeature("lavenderPerChunk", 0);
|
||||||
public int oasesPerChunk = 0;
|
setFeature("thornsPerChunk", 0);
|
||||||
public int minersDelightPerChunk = 2;
|
setFeature("stalagmitesPerChunk", 3);
|
||||||
public int rootsPerChunk = 9;
|
setFeature("stalactitesPerChunk", 6);
|
||||||
public int grassSplatterPerChunk = 0;
|
setFeature("desertSproutsPerChunk", 0);
|
||||||
public int rockpilesPerChunk = 0;
|
setFeature("bromeliadsPerChunk", 0);
|
||||||
public int logsPerChunk = 0;
|
setFeature("waterReedsPerChunk", 0);
|
||||||
public int lavaSpoutsPerChunk = 0;
|
setFeature("wildCarrotsPerChunk", 0);
|
||||||
public int cobwebsPerChunk = 0;
|
setFeature("poisonIvyPerChunk", 0);
|
||||||
public int cobwebNestsPerChunk = 0;
|
setFeature("berryBushesPerChunk", 0);
|
||||||
public int wasteland1PerChunk = 0;
|
setFeature("portobellosPerChunk", 0);
|
||||||
public int wasteland2PerChunk = 0;
|
setFeature("koruPerChunk", 0);
|
||||||
public int wasteland3PerChunk = 0;
|
setFeature("toadstoolsPerChunk", 0);
|
||||||
public int wasteland4PerChunk = 0;
|
setFeature("blueMilksPerChunk", 0);
|
||||||
|
setFeature("cattailsPerChunk", 0);
|
||||||
public int bopFlowersPerChunk = 0;
|
setFeature("highCattailsPerChunk", 0);
|
||||||
|
setFeature("algaePerChunk", 0);
|
||||||
|
setFeature("sproutsPerChunk", 0);
|
||||||
|
setFeature("tinyCactiPerChunk", 0);
|
||||||
|
setFeature("oasesPerChunk", 0);
|
||||||
|
setFeature("minersDelightPerChunk", 2);
|
||||||
|
setFeature("rootsPerChunk", 9);
|
||||||
|
setFeature("grassSplatterPerChunk", 0);
|
||||||
|
setFeature("rockpilesPerChunk", 0);
|
||||||
|
setFeature("logsPerChunk", 0);
|
||||||
|
setFeature("lavaSpoutsPerChunk", 0);
|
||||||
|
setFeature("cobwebsPerChunk", 0);
|
||||||
|
setFeature("cobwebNestsPerChunk", 0);
|
||||||
|
setFeature("wasteland1PerChunk", 0);
|
||||||
|
setFeature("wasteland2PerChunk", 0);
|
||||||
|
setFeature("wasteland3PerChunk", 0);
|
||||||
|
setFeature("wasteland4PerChunk", 0);
|
||||||
|
|
||||||
|
setFeature("bopFlowersPerChunk", 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public <T extends Object> void setFeature(String name, T value)
|
||||||
|
{
|
||||||
|
featureValueMap.put(name, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getFeature(String name)
|
||||||
|
{
|
||||||
|
return featureValueMap.get(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Set<String> getFeatureNames()
|
||||||
|
{
|
||||||
|
return featureValueMap.keySet();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
package biomesoplenty.common.world.decoration;
|
||||||
|
|
||||||
|
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
public class ForcedDecorator implements IBOPBiome
|
||||||
|
{
|
||||||
|
protected BOPWorldFeatures bopWorldFeatures = new BOPWorldFeatures();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WorldGenBOPFlora getRandomWorldGenForBOPFlowers(Random random)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BOPWorldFeatures getBiomeFeatures()
|
||||||
|
{
|
||||||
|
return bopWorldFeatures;
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,24 +1,9 @@
|
||||||
package biomesoplenty.common.world.decoration;
|
package biomesoplenty.common.world.decoration;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import biomesoplenty.common.world.forceddecorators.*;
|
||||||
|
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
import net.minecraft.world.biome.BiomeGenBase;
|
||||||
import biomesoplenty.common.world.forceddecorators.BirchForestForcedDecorator;
|
|
||||||
import biomesoplenty.common.world.forceddecorators.DesertForcedDecorator;
|
import java.util.HashMap;
|
||||||
import biomesoplenty.common.world.forceddecorators.ExtremeHillsForcedDecorator;
|
|
||||||
import biomesoplenty.common.world.forceddecorators.ForcedDecorator;
|
|
||||||
import biomesoplenty.common.world.forceddecorators.ForestForcedDecorator;
|
|
||||||
import biomesoplenty.common.world.forceddecorators.IcePlainsForcedDecorator;
|
|
||||||
import biomesoplenty.common.world.forceddecorators.JungleForcedDecorator;
|
|
||||||
import biomesoplenty.common.world.forceddecorators.MesaForcedDecorator;
|
|
||||||
import biomesoplenty.common.world.forceddecorators.MushroomIslandForcedDecorator;
|
|
||||||
import biomesoplenty.common.world.forceddecorators.OceanForcedDecorator;
|
|
||||||
import biomesoplenty.common.world.forceddecorators.PlainsForcedDecorator;
|
|
||||||
import biomesoplenty.common.world.forceddecorators.RiverForcedDecorator;
|
|
||||||
import biomesoplenty.common.world.forceddecorators.RoofedForestForcedDecorator;
|
|
||||||
import biomesoplenty.common.world.forceddecorators.SavannaForcedDecorator;
|
|
||||||
import biomesoplenty.common.world.forceddecorators.SwampForcedDecorator;
|
|
||||||
import biomesoplenty.common.world.forceddecorators.TaigaForcedDecorator;
|
|
||||||
|
|
||||||
public class ForcedDecorators
|
public class ForcedDecorators
|
||||||
{
|
{
|
||||||
|
@ -77,7 +62,7 @@ public class ForcedDecorators
|
||||||
forcedDecoratorMap.put(biomeID, decorator);
|
forcedDecoratorMap.put(biomeID, decorator);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IBOPDecoration getForcedDecorator(int biomeID)
|
public static IBOPBiome getForcedDecorator(int biomeID)
|
||||||
{
|
{
|
||||||
return forcedDecoratorMap.get(biomeID);
|
return forcedDecoratorMap.get(biomeID);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,19 +1,17 @@
|
||||||
package biomesoplenty.common.world.decoration;
|
package biomesoplenty.common.world.decoration;
|
||||||
|
|
||||||
|
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
public interface IBOPBiome
|
||||||
|
|
||||||
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
|
||||||
|
|
||||||
public interface IBOPDecoration
|
|
||||||
{
|
{
|
||||||
|
public HashMap<WorldGenerator, Double> weightedGrassGen = new HashMap<WorldGenerator, Double>();
|
||||||
|
public HashMap<WorldGenBOPFlora, Integer> weightedFlowerGen = new HashMap<WorldGenBOPFlora, Integer>();
|
||||||
|
|
||||||
public WorldGenBOPFlora getRandomWorldGenForBOPFlowers(Random random);
|
public WorldGenBOPFlora getRandomWorldGenForBOPFlowers(Random random);
|
||||||
|
|
||||||
public BOPWorldFeatures getWorldFeatures();
|
public BOPWorldFeatures getBiomeFeatures();
|
||||||
|
|
||||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass();
|
|
||||||
|
|
||||||
public HashMap<WorldGenBOPFlora, Integer> getWeightedWorldGenForBOPFlowers();
|
|
||||||
}
|
}
|
|
@ -1,17 +1,14 @@
|
||||||
package biomesoplenty.common.world.features;
|
package biomesoplenty.common.world.features;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
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.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 net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import java.util.Random;
|
||||||
import biomesoplenty.common.world.decoration.IBOPDecoration;
|
|
||||||
import biomesoplenty.common.world.generation.WorldGeneratorBOP;
|
|
||||||
|
|
||||||
public class WorldGenBOPCoral extends WorldGeneratorBOP
|
public class WorldGenBOPCoral extends WorldGeneratorBOP
|
||||||
{
|
{
|
||||||
|
@ -43,11 +40,9 @@ public class WorldGenBOPCoral 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);
|
||||||
|
|
||||||
//TODO: isAirBlock()
|
|
||||||
if (world.getBlock(i1, j1, k1) == Blocks.water && world.getBlock(i1, j1 + 1, k1) == Blocks.water && (!world.provider.hasNoSky || j1 < 255) &&
|
if (world.getBlock(i1, j1, k1) == Blocks.water && world.getBlock(i1, j1 + 1, k1) == Blocks.water && (!world.provider.hasNoSky || j1 < 255) &&
|
||||||
this.flora.canReplace(world, i1, j1, k1, 0, new ItemStack(flora, 1, floraMeta)))
|
this.flora.canReplace(world, i1, j1, k1, 0, new ItemStack(flora, 1, floraMeta)))
|
||||||
{
|
{
|
||||||
//TODO: setBlock()
|
|
||||||
world.setBlock(i1, j1, k1, this.flora, this.floraMeta, 2);
|
world.setBlock(i1, j1, k1, this.flora, this.floraMeta, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -56,15 +51,15 @@ public class WorldGenBOPCoral extends WorldGeneratorBOP
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doGeneration(World world, Random random, Field worldGeneratorField, WorldGenerator worldGenerator, BiomeGenBase biome, IBOPDecoration bopDecoration, int x, int z) throws Exception
|
public void setupGeneration(World world, Random random, BiomeGenBase biome, String featureName, int x, int z)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < worldGeneratorField.getInt(bopDecoration.getWorldFeatures()); i++)
|
for (int i = 0; i < (Integer)BOPDecorationManager.getBiomeFeatures(biome.biomeID).getFeature(featureName); i++)
|
||||||
{
|
{
|
||||||
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(world.getHeightValue(randX, randZ) * 2);
|
||||||
|
|
||||||
worldGenerator.generate(world, random, randX, randY, randZ);
|
this.generate(world, random, randX, randY, randZ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,15 +1,13 @@
|
||||||
package biomesoplenty.common.world.features;
|
package biomesoplenty.common.world.features;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import biomesoplenty.common.world.decoration.BOPDecorationManager;
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.init.Blocks;
|
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 net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.common.world.decoration.IBOPDecoration;
|
import java.util.Random;
|
||||||
|
|
||||||
public class WorldGenBOPDoubleFlora extends WorldGenBOPFlora
|
public class WorldGenBOPDoubleFlora extends WorldGenBOPFlora
|
||||||
{
|
{
|
||||||
|
@ -89,15 +87,15 @@ public class WorldGenBOPDoubleFlora extends WorldGenBOPFlora
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doGeneration(World world, Random random, Field worldGeneratorField, WorldGenerator worldGenerator, BiomeGenBase biome, IBOPDecoration bopDecoration, int x, int z) throws Exception
|
public void setupGeneration(World world, Random random, BiomeGenBase biome, String featureName, int x, int z)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < worldGeneratorField.getInt(bopDecoration.getWorldFeatures()); i++)
|
for (int i = 0; i < (Integer)BOPDecorationManager.getBiomeFeatures(biome.biomeID).getFeature(featureName); i++)
|
||||||
{
|
{
|
||||||
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(world.getHeightValue(randX, randZ) * 2);
|
||||||
|
|
||||||
worldGenerator.generate(world, random, randX, randY, randZ);
|
this.generate(world, random, randX, randY, randZ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,17 +1,15 @@
|
||||||
package biomesoplenty.common.world.features;
|
package biomesoplenty.common.world.features;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import java.util.Random;
|
import biomesoplenty.common.world.decoration.BOPDecorationManager;
|
||||||
|
import biomesoplenty.common.world.generation.WorldGeneratorBOP;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.init.Blocks;
|
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 net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import java.util.Random;
|
||||||
import biomesoplenty.common.world.decoration.IBOPDecoration;
|
|
||||||
import biomesoplenty.common.world.generation.WorldGeneratorBOP;
|
|
||||||
|
|
||||||
public class WorldGenBOPFlora extends WorldGeneratorBOP
|
public class WorldGenBOPFlora extends WorldGeneratorBOP
|
||||||
{
|
{
|
||||||
|
@ -43,12 +41,10 @@ public class WorldGenBOPFlora 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);
|
||||||
|
|
||||||
//TODO: isAirBlock()
|
|
||||||
if (world.isAirBlock(i1, j1, k1) && (!world.provider.hasNoSky || j1 < 255) &&
|
if (world.isAirBlock(i1, j1, k1) && (!world.provider.hasNoSky || j1 < 255) &&
|
||||||
(flora == Blocks.web ? world.getBlock(i1, j1 + 1, k1) == BOPBlockHelper.get("leaves2") || world.getBlock(i1, j1 + 1, k1) == BOPBlockHelper.get("colorizedLeaves2") || world.getBlock(i1, j1 - 1, k1) == Blocks.grass :
|
(flora == Blocks.web ? world.getBlock(i1, j1 + 1, k1) == BOPBlockHelper.get("leaves2") || world.getBlock(i1, j1 + 1, k1) == BOPBlockHelper.get("colorizedLeaves2") || world.getBlock(i1, j1 - 1, k1) == Blocks.grass :
|
||||||
this.flora.canReplace(world, i1, j1, k1, 0, new ItemStack(flora, 1, floraMeta))))
|
this.flora.canReplace(world, i1, j1, k1, 0, new ItemStack(flora, 1, floraMeta))))
|
||||||
{
|
{
|
||||||
//TODO: setBlock()
|
|
||||||
world.setBlock(i1, j1, k1, this.flora, this.floraMeta, 2);
|
world.setBlock(i1, j1, k1, this.flora, this.floraMeta, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -57,15 +53,15 @@ public class WorldGenBOPFlora extends WorldGeneratorBOP
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doGeneration(World world, Random random, Field worldGeneratorField, WorldGenerator worldGenerator, BiomeGenBase biome, IBOPDecoration bopDecoration, int x, int z) throws Exception
|
public void setupGeneration(World world, Random random, BiomeGenBase biome, String featureName, int x, int z)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < worldGeneratorField.getInt(bopDecoration.getWorldFeatures()); i++)
|
for (int i = 0; i < (Integer)BOPDecorationManager.getBiomeFeatures(biome.biomeID).getFeature(featureName); i++)
|
||||||
{
|
{
|
||||||
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(world.getHeightValue(randX, randZ) * 2);
|
||||||
|
|
||||||
worldGenerator.generate(world, random, randX, randY, randZ);
|
this.generate(world, random, randX, randY, randZ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,15 +1,13 @@
|
||||||
package biomesoplenty.common.world.features;
|
package biomesoplenty.common.world.features;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
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.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 net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.common.world.decoration.IBOPDecoration;
|
import java.util.Random;
|
||||||
import biomesoplenty.common.world.generation.WorldGeneratorBOP;
|
|
||||||
|
|
||||||
public class WorldGenBOPTallGrass extends WorldGeneratorBOP
|
public class WorldGenBOPTallGrass extends WorldGeneratorBOP
|
||||||
{
|
{
|
||||||
|
@ -54,15 +52,15 @@ public class WorldGenBOPTallGrass extends WorldGeneratorBOP
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doGeneration(World world, Random random, Field worldGeneratorField, WorldGenerator worldGenerator, BiomeGenBase biome, IBOPDecoration bopDecoration, int x, int z) throws Exception
|
public void setupGeneration(World world, Random random, BiomeGenBase biome, String featureName, int x, int z)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < worldGeneratorField.getInt(bopDecoration.getWorldFeatures()); i++)
|
for (int i = 0; i < (Integer)BOPDecorationManager.getBiomeFeatures(biome.biomeID).getFeature(featureName); i++)
|
||||||
{
|
{
|
||||||
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(world.getHeightValue(randX, randZ) * 2);
|
||||||
|
|
||||||
worldGenerator.generate(world, random, randX, randY, randZ);
|
this.generate(world, random, randX, randY, randZ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,16 +1,14 @@
|
||||||
package biomesoplenty.common.world.features;
|
package biomesoplenty.common.world.features;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
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.entity.monster.EntitySpider;
|
import net.minecraft.entity.monster.EntitySpider;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
import net.minecraft.world.biome.BiomeGenBase;
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.common.world.decoration.IBOPDecoration;
|
import java.util.Random;
|
||||||
import biomesoplenty.common.world.generation.WorldGeneratorBOP;
|
|
||||||
|
|
||||||
public class WorldGenCobwebNest extends WorldGeneratorBOP
|
public class WorldGenCobwebNest extends WorldGeneratorBOP
|
||||||
{
|
{
|
||||||
|
@ -67,15 +65,15 @@ public class WorldGenCobwebNest extends WorldGeneratorBOP
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doGeneration(World world, Random random, Field worldGeneratorField, WorldGenerator worldGenerator, BiomeGenBase biome, IBOPDecoration bopDecoration, int x, int z) throws Exception
|
public void setupGeneration(World world, Random random, BiomeGenBase biome, String featureName, int x, int z)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < worldGeneratorField.getInt(bopDecoration.getWorldFeatures()); i++)
|
for (int i = 0; i < (Integer)BOPDecorationManager.getBiomeFeatures(biome.biomeID).getFeature(featureName); i++)
|
||||||
{
|
{
|
||||||
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(world.getHeightValue(randX, randZ) * 2);
|
||||||
|
|
||||||
worldGenerator.generate(world, random, randX, randY, randZ);
|
this.generate(world, random, randX, randY, randZ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,14 @@
|
||||||
package biomesoplenty.common.world.features;
|
package biomesoplenty.common.world.features;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import java.util.Random;
|
import biomesoplenty.common.world.decoration.BOPDecorationManager;
|
||||||
|
import biomesoplenty.common.world.generation.WorldGeneratorBOP;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
import net.minecraft.world.biome.BiomeGenBase;
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import java.util.Random;
|
||||||
import biomesoplenty.common.world.decoration.IBOPDecoration;
|
|
||||||
import biomesoplenty.common.world.generation.WorldGeneratorBOP;
|
|
||||||
|
|
||||||
public class WorldGenGrassSplatter extends WorldGeneratorBOP
|
public class WorldGenGrassSplatter extends WorldGeneratorBOP
|
||||||
{
|
{
|
||||||
|
@ -65,15 +63,15 @@ public class WorldGenGrassSplatter extends WorldGeneratorBOP
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doGeneration(World world, Random random, Field worldGeneratorField, WorldGenerator worldGenerator, BiomeGenBase biome, IBOPDecoration bopDecoration, int x, int z) throws Exception
|
public void setupGeneration(World world, Random random, BiomeGenBase biome, String featureName, int x, int z)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < worldGeneratorField.getInt(bopDecoration.getWorldFeatures()); i++)
|
for (int i = 0; i < (Integer)BOPDecorationManager.getBiomeFeatures(biome.biomeID).getFeature(featureName); i++)
|
||||||
{
|
{
|
||||||
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(world.getHeightValue(randX, randZ) * 2);
|
||||||
|
|
||||||
worldGenerator.generate(world, random, randX, randY, randZ);
|
this.generate(world, random, randX, randY, randZ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,14 @@
|
||||||
package biomesoplenty.common.world.features;
|
package biomesoplenty.common.world.features;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import java.util.Random;
|
import biomesoplenty.common.world.decoration.BOPDecorationManager;
|
||||||
|
import biomesoplenty.common.world.generation.WorldGeneratorBOP;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
import net.minecraft.world.biome.BiomeGenBase;
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import java.util.Random;
|
||||||
import biomesoplenty.common.world.decoration.IBOPDecoration;
|
|
||||||
import biomesoplenty.common.world.generation.WorldGeneratorBOP;
|
|
||||||
|
|
||||||
public class WorldGenLavaSpout extends WorldGeneratorBOP
|
public class WorldGenLavaSpout extends WorldGeneratorBOP
|
||||||
{
|
{
|
||||||
|
@ -57,15 +55,15 @@ public class WorldGenLavaSpout extends WorldGeneratorBOP
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doGeneration(World world, Random random, Field worldGeneratorField, WorldGenerator worldGenerator, BiomeGenBase biome, IBOPDecoration bopDecoration, int x, int z) throws Exception
|
public void setupGeneration(World world, Random random, BiomeGenBase biome, String featureName, int x, int z)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < worldGeneratorField.getInt(bopDecoration.getWorldFeatures()); i++)
|
for (int i = 0; i < (Integer)BOPDecorationManager.getBiomeFeatures(biome.biomeID).getFeature(featureName); i++)
|
||||||
{
|
{
|
||||||
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(world.getHeightValue(randX, randZ) * 2);
|
||||||
|
|
||||||
worldGenerator.generate(world, random, randX, randY, randZ);
|
this.generate(world, random, randX, randY, randZ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,12 @@
|
||||||
package biomesoplenty.common.world.features;
|
package biomesoplenty.common.world.features;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import biomesoplenty.common.world.decoration.BOPDecorationManager;
|
||||||
import java.util.Random;
|
import biomesoplenty.common.world.generation.WorldGeneratorBOP;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
import net.minecraft.world.biome.BiomeGenBase;
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.common.world.decoration.IBOPDecoration;
|
import java.util.Random;
|
||||||
import biomesoplenty.common.world.generation.WorldGeneratorBOP;
|
|
||||||
|
|
||||||
public class WorldGenLog extends WorldGeneratorBOP
|
public class WorldGenLog extends WorldGeneratorBOP
|
||||||
{
|
{
|
||||||
|
@ -57,15 +54,15 @@ public class WorldGenLog extends WorldGeneratorBOP
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doGeneration(World world, Random random, Field worldGeneratorField, WorldGenerator worldGenerator, BiomeGenBase biome, IBOPDecoration bopDecoration, int x, int z) throws Exception
|
public void setupGeneration(World world, Random random, BiomeGenBase biome, String featureName, int x, int z)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < worldGeneratorField.getInt(bopDecoration.getWorldFeatures()); i++)
|
for (int i = 0; i < (Integer)BOPDecorationManager.getBiomeFeatures(biome.biomeID).getFeature(featureName); i++)
|
||||||
{
|
{
|
||||||
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(world.getHeightValue(randX, randZ) * 2);
|
||||||
|
|
||||||
worldGenerator.generate(world, random, randX, randY, randZ);
|
this.generate(world, random, randX, randY, randZ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,14 @@
|
||||||
package biomesoplenty.common.world.features;
|
package biomesoplenty.common.world.features;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import java.util.Random;
|
import biomesoplenty.common.world.decoration.BOPDecorationManager;
|
||||||
|
import biomesoplenty.common.world.generation.WorldGeneratorBOP;
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.Direction;
|
||||||
import net.minecraft.util.Facing;
|
import net.minecraft.util.Facing;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
import net.minecraft.world.biome.BiomeGenBase;
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import java.util.Random;
|
||||||
import biomesoplenty.common.world.decoration.IBOPDecoration;
|
|
||||||
import biomesoplenty.common.world.generation.WorldGeneratorBOP;
|
|
||||||
|
|
||||||
public class WorldGenMoss extends WorldGeneratorBOP
|
public class WorldGenMoss extends WorldGeneratorBOP
|
||||||
{
|
{
|
||||||
|
@ -51,15 +49,15 @@ public class WorldGenMoss extends WorldGeneratorBOP
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doGeneration(World world, Random random, Field worldGeneratorField, WorldGenerator worldGenerator, BiomeGenBase biome, IBOPDecoration bopDecoration, int x, int z) throws Exception
|
public void setupGeneration(World world, Random random, BiomeGenBase biome, String featureName, int x, int z)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < worldGeneratorField.getInt(bopDecoration.getWorldFeatures()); i++)
|
for (int i = 0; i < (Integer)BOPDecorationManager.getBiomeFeatures(biome.biomeID).getFeature(featureName); i++)
|
||||||
{
|
{
|
||||||
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(world.getHeightValue(randX, randZ) * 2);
|
||||||
|
|
||||||
worldGenerator.generate(world, random, randX, randY, randZ);
|
this.generate(world, random, randX, randY, randZ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,15 +1,13 @@
|
||||||
package biomesoplenty.common.world.features;
|
package biomesoplenty.common.world.features;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
import java.util.Random;
|
import biomesoplenty.common.world.decoration.BOPDecorationManager;
|
||||||
|
import biomesoplenty.common.world.generation.WorldGeneratorBOP;
|
||||||
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 net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.api.BOPBlockHelper;
|
import java.util.Random;
|
||||||
import biomesoplenty.common.world.decoration.IBOPDecoration;
|
|
||||||
import biomesoplenty.common.world.generation.WorldGeneratorBOP;
|
|
||||||
|
|
||||||
public class WorldGenRiverCane extends WorldGeneratorBOP
|
public class WorldGenRiverCane extends WorldGeneratorBOP
|
||||||
{
|
{
|
||||||
|
@ -43,15 +41,15 @@ public class WorldGenRiverCane extends WorldGeneratorBOP
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doGeneration(World world, Random random, Field worldGeneratorField, WorldGenerator worldGenerator, BiomeGenBase biome, IBOPDecoration bopDecoration, int x, int z) throws Exception
|
public void setupGeneration(World world, Random random, BiomeGenBase biome, String featureName, int x, int z)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < worldGeneratorField.getInt(bopDecoration.getWorldFeatures()); i++)
|
for (int i = 0; i < (Integer)BOPDecorationManager.getBiomeFeatures(biome.biomeID).getFeature(featureName); i++)
|
||||||
{
|
{
|
||||||
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(world.getHeightValue(randX, randZ) * 2);
|
||||||
|
|
||||||
worldGenerator.generate(world, random, randX, randY, randZ);
|
this.generate(world, random, randX, randY, randZ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,12 @@
|
||||||
package biomesoplenty.common.world.features;
|
package biomesoplenty.common.world.features;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import biomesoplenty.common.world.decoration.BOPDecorationManager;
|
||||||
import java.util.Random;
|
import biomesoplenty.common.world.generation.WorldGeneratorBOP;
|
||||||
|
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
import net.minecraft.world.biome.BiomeGenBase;
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
||||||
import biomesoplenty.common.world.decoration.IBOPDecoration;
|
import java.util.Random;
|
||||||
import biomesoplenty.common.world.generation.WorldGeneratorBOP;
|
|
||||||
|
|
||||||
public class WorldGenRockpile extends WorldGeneratorBOP
|
public class WorldGenRockpile extends WorldGeneratorBOP
|
||||||
{
|
{
|
||||||
|
@ -84,15 +82,15 @@ public class WorldGenRockpile extends WorldGeneratorBOP
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doGeneration(World world, Random random, Field worldGeneratorField, WorldGenerator worldGenerator, BiomeGenBase biome, IBOPDecoration bopDecoration, int x, int z) throws Exception
|
public void setupGeneration(World world, Random random, BiomeGenBase biome, String featureName, int x, int z)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < worldGeneratorField.getInt(bopDecoration.getWorldFeatures()); i++)
|
for (int i = 0; i < (Integer)BOPDecorationManager.getBiomeFeatures(biome.biomeID).getFeature(featureName); i++)
|
||||||
{
|
{
|
||||||
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(world.getHeightValue(randX, randZ) * 2);
|
||||||
|
|
||||||
worldGenerator.generate(world, random, randX, randY, randZ);
|
this.generate(world, random, randX, randY, randZ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue