WitherDoggie

ModBiome

May 26th, 2016
71
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.wither.withermod.worldgen.biome;
  2.  
  3. import net.minecraft.block.state.IBlockState;
  4. import net.minecraft.world.biome.BiomeGenBase;
  5.  
  6. public class ModBiome extends BiomeGenBase{
  7.  
  8.     public ModBiome(int id) {
  9.         super(id);
  10.        
  11.         this.spawnableCreatureList.clear();
  12.  
  13.     }
  14.    
  15.     public ModBiome setTopFillerBlock(IBlockState topBlock, IBlockState fillerBlock){
  16.        
  17.         this.topBlock = topBlock;
  18.         this.fillerBlock = fillerBlock;
  19.        
  20.         return this;
  21.     }
  22.    
  23.     public ModBiome setMinMaxHeight(float minHeight, float maxHeight){
  24.        
  25.         this.minHeight = minHeight;
  26.         this.maxHeight = maxHeight;
  27.        
  28.         return this;
  29.     }
  30.    
  31.     public ModBiome addDecoration(EnumBiomeDecorator decorator, int amount){
  32.        
  33.         switch(decorator){
  34.        
  35.         case BIGMUSHROOM:
  36.             this.theBiomeDecorator.bigMushroomsPerChunk = amount;
  37.    
  38.         case CACTI:
  39.             this.theBiomeDecorator.cactiPerChunk = amount;
  40.            
  41.         case CLAY:
  42.             this.theBiomeDecorator.clayPerChunk = amount;
  43.            
  44.         case DEADBUSH:
  45.             this.theBiomeDecorator.deadBushPerChunk = amount;
  46.            
  47.         case FLOWERS:
  48.             this.theBiomeDecorator.flowersPerChunk = amount;
  49.            
  50.         case GRASS:
  51.             this.theBiomeDecorator.grassPerChunk = amount;
  52.            
  53.         case MUSHROOMS:
  54.             this.theBiomeDecorator.mushroomsPerChunk = amount;
  55.            
  56.         case REEDS:
  57.             this.theBiomeDecorator.reedsPerChunk = amount;
  58.            
  59.         case SAND:
  60.             this.theBiomeDecorator.sandPerChunk = amount;
  61.            
  62.         case TREE:
  63.             this.theBiomeDecorator.treesPerChunk = amount;
  64.            
  65.         case WATERLILY:
  66.             this.theBiomeDecorator.waterlilyPerChunk = amount;
  67.            
  68.             break;
  69.             default: break;
  70.         }
  71.         return this;
  72.  
  73.     }
  74.    
  75.     public static enum EnumBiomeDecorator{
  76.        
  77.         BIGMUSHROOM,
  78.         CACTI,
  79.         CLAY,
  80.         DEADBUSH,
  81.         FLOWERS,
  82.         GRASS,
  83.         MUSHROOMS,
  84.         REEDS,
  85.         SAND,
  86.         TREE,
  87.         WATERLILY;
  88.     }
  89.    
  90.  
  91. }
RAW Paste Data Copied