Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.halestormxv.worldALT.biomes.decorators;
- import java.util.Random;
- import com.halestormxv.biome.features.WorldGenCelestialTree;
- import com.halestormxv.blocks.CelestialCraft_blocks;
- import com.halestormxv.worldALT.gen.WorldGenEffectTree;
- import com.halestormxv.worldALT.gen.WorldGenForestBigTree;
- import com.halestormxv.worldALT.gen.WorldGenForestTrees;
- import net.minecraft.block.Block;
- import net.minecraft.init.Blocks;
- import net.minecraft.world.World;
- import net.minecraft.world.biome.BiomeDecorator;
- import net.minecraft.world.biome.BiomeGenBase;
- import net.minecraft.world.gen.feature.WorldGenMinable;
- import net.minecraft.world.gen.feature.WorldGenerator;
- public class BiomeDecoratorMod extends BiomeDecorator
- {
- /** The world the BiomeDecorator is currently decorating */
- public static World currentWorld;
- /** The Biome Decorator's random number generator. */
- public static Random randomGenerator;
- /** The X-coordinate of the chunk currently being decorated */
- public static int chunk_X;
- /** The Z-coordinate of the chunk currently being decorated */
- public static int chunk_Z;
- /** True if decorator should generate surface lava & water */
- public static boolean generateLakes;
- /** How meny trees per chunk, set in each biome class **/
- public static int howMenyTrees;
- /** Dimension Trees **/
- public static WorldGenForestTrees smallTree;
- public static WorldGenForestBigTree bigTree;
- public static WorldGenEffectTree effectTree;
- public static WorldGenCelestialTree celestialTree;
- @SuppressWarnings("unused")
- private static final String __OBFID = "CL_00000164";
- public BiomeDecoratorMod() {
- coalGen = new WorldGenMinable(Blocks.coal_ore, 16, Blocks.coal_ore);
- ironGen = new WorldGenMinable(Blocks.iron_ore, 8, Blocks.iron_ore);
- goldGen = new WorldGenMinable(Blocks.gold_ore, 8, Blocks.gold_ore);
- redstoneGen = new WorldGenMinable(Blocks.redstone_ore, 7, Blocks.redstone_ore);
- diamondGen = new WorldGenMinable(Blocks.diamond_ore, 7, Blocks.diamond_ore);
- lapisGen = new WorldGenMinable(Blocks.lapis_ore, 6, Blocks.lapis_ore);
- // TREES
- smallTree = new WorldGenForestTrees(true);
- bigTree = new WorldGenForestBigTree(true, 10, 1, 5);
- effectTree = new WorldGenEffectTree(true);
- celestialTree = new WorldGenCelestialTree(CelestialCraft_blocks.blockLog, CelestialCraft_blocks.blockLeaf, 1, 1, false, 4, 6, false);
- // generates lakes and lava lakes in dimension.
- generateLakes = true;
- }
- public void decorateChunk(World world, Random random, BiomeGenBase biomeGenBase, int chunkX, int chunkZ) {
- if (currentWorld != null) {
- throw new RuntimeException("Already decorating!!");
- } else {
- currentWorld = world;
- randomGenerator = random;
- chunk_X = chunkX;
- chunk_Z = chunkZ;
- genDecorationsForBiome(biomeGenBase);
- currentWorld = null;
- randomGenerator = null;
- }
- }
- /**
- * Decorate's biome.
- *
- * @param biome
- */
- protected void genDecorationsForBiome(BiomeGenBase biome) {
- BiomeDecoratorHelper.decorateBiome(biome);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement