Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.wither.withermod.worldgen.biome;
- import java.util.Random;
- import net.minecraft.block.BlockSand;
- import net.minecraft.block.material.Material;
- import net.minecraft.block.state.IBlockState;
- import net.minecraft.entity.EnumCreatureType;
- import net.minecraft.entity.monster.EntitySkeleton;
- import net.minecraft.init.Blocks;
- import net.minecraft.util.BlockPos;
- import net.minecraft.world.World;
- import net.minecraft.world.biome.BiomeGenBase;
- import net.minecraft.world.chunk.ChunkPrimer;
- import net.minecraftforge.fml.common.registry.EntityRegistry;
- public class ModBiome extends BiomeGenBase {
- public ModBiome(int id) {
- super(id);
- this.spawnableCreatureList.clear();
- this.spawnableMonsterList.clear();
- EntityRegistry.addSpawn(EntitySkeleton.class, 50, 1, 10, EnumCreatureType.MONSTER, this);
- }
- @Override
- public void genTerrainBlocks(World worldIn, Random random, ChunkPrimer chunkPrimer, int x, int z, double stoneNoise) {
- super.genTerrainBlocks(worldIn, random, chunkPrimer, x, z, stoneNoise);
- }
- public ModBiome setTopFillerBlock(IBlockState topBlock, IBlockState fillerBlock) {
- this.topBlock = topBlock;
- this.fillerBlock = fillerBlock;
- return this;
- }
- public ModBiome setMinMaxHeight(float minHeight, float maxHeight) {
- this.minHeight = minHeight;
- this.maxHeight = maxHeight;
- return this;
- }
- public ModBiome addDecoration(EnumBiomeDecorator decorator, int amount) {
- switch (decorator) {
- case BIGMUSHROOM:
- this.theBiomeDecorator.bigMushroomsPerChunk = amount;
- case CACTI:
- this.theBiomeDecorator.cactiPerChunk = amount;
- case CLAY:
- this.theBiomeDecorator.clayPerChunk = amount;
- case DEADBUSH:
- this.theBiomeDecorator.deadBushPerChunk = amount;
- case FLOWERS:
- this.theBiomeDecorator.flowersPerChunk = amount;
- case GRASS:
- this.theBiomeDecorator.grassPerChunk = amount;
- case MUSHROOMS:
- this.theBiomeDecorator.mushroomsPerChunk = amount;
- case REEDS:
- this.theBiomeDecorator.reedsPerChunk = amount;
- case SAND:
- this.theBiomeDecorator.sandPerChunk = amount;
- case TREE:
- this.theBiomeDecorator.treesPerChunk = amount;
- case WATERLILY:
- this.theBiomeDecorator.waterlilyPerChunk = amount;
- break;
- default:
- break;
- }
- return this;
- }
- public static enum EnumBiomeDecorator {
- BIGMUSHROOM, CACTI, CLAY, DEADBUSH, FLOWERS, GRASS, MUSHROOMS, REEDS, SAND, TREE, WATERLILY;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement