aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/everglades/biome/BiomeEverglades.java
blob: 72732249b0a97ca854f863659464f7fb3e9fa084 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
package gtPlusPlus.everglades.biome;

import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.monster.EntityPigZombie;
import net.minecraft.entity.passive.EntityBat;
import net.minecraft.entity.passive.EntitySquid;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.common.BiomeDictionary;
import net.minecraftforge.common.BiomeManager;

import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gtPlusPlus.core.config.Configuration;
import gtPlusPlus.core.entity.monster.EntitySickBlaze;
import gtPlusPlus.core.entity.monster.EntityStaballoyConstruct;
import gtPlusPlus.everglades.dimension.DimensionEverglades;

public class BiomeEverglades {

    public static BiomeGenEverglades biome = new BiomeGenEverglades();

    public Object instance;

    public BiomeEverglades() {}

    public void load() {
        BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.DEAD);
        BiomeManager.addSpawnBiome(biome);
    }

    public void serverLoad(FMLServerStartingEvent event) {}

    public void preInit(FMLPreInitializationEvent event) {}

    static class BiomeGenEverglades extends BiomeGenBase {

        public BiomeGenEverglades() {
            super(Configuration.worldgen.EVERGLADESBIOME_ID);
            this.theBiomeDecorator = new CustomBiomeGenerator();
            this.theBiomeDecorator.treesPerChunk = 10;
            this.setBiomeName("Toxic Everglades");
            this.topBlock = DimensionEverglades.blockTopLayer;
            this.fillerBlock = DimensionEverglades.blockSecondLayer;
            this.enableRain = true;
            this.enableSnow = false;
            this.rainfall = 0.7F;
            this.setHeight(new BiomeGenBase.Height(0.3F, 0.5F));
            this.heightVariation = 0.4F;
            this.waterColorMultiplier = 0x17290A;
            this.rootHeight = -0.25f; // Ground level

            this.spawnableMonsterList.clear();
            this.spawnableCreatureList.clear();
            this.spawnableWaterCreatureList.clear();
            this.spawnableCaveCreatureList.clear();

            // Enemies
            this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySickBlaze.class, 100, 2, 6));
            this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityPigZombie.class, 75, 4, 16));
            this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityStaballoyConstruct.class, 20, 1, 2));

            // Animals
            this.spawnableWaterCreatureList.add(new BiomeGenBase.SpawnListEntry(EntitySquid.class, 1, 1, 6));
            this.spawnableCaveCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityBat.class, 10, 8, 8));
        }

        @Override
        @SideOnly(Side.CLIENT)
        public int getSkyColorByTemp(float par1) {
            return 0xF67A14;
        }

        @SuppressWarnings({ "unused" })
        private boolean addToMonsterSpawnLists(Class<? extends EntityLiving> EntityClass, int a, int b, int c) {
            this.spawnableCaveCreatureList.add(new SpawnListEntry(EntityClass, a, b, c));
            return true;
        }
    }
}