Created
July 4, 2014 21:11
-
-
Save WillR27/4dc74083bc4cd7f37d3d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.blocklings.entity; | |
import net.minecraft.entity.EntityList; | |
import net.minecraft.entity.EnumCreatureType; | |
import net.minecraft.world.biome.BiomeGenBase; | |
import com.blocklings.main.Blocklings; | |
import cpw.mods.fml.common.registry.EntityRegistry; | |
public class RegisterBlockling { | |
public static void registerEntity() { | |
createEntity(EntityBlockling.class, "entity_blockling", 0x79553A, 0x6FAE44); | |
} | |
public static void createEntity(Class entityClass, String entityName, int solidColour, int spotColour) { | |
int randomID = EntityRegistry.findGlobalUniqueEntityId(); | |
EntityRegistry.registerGlobalEntityID(entityClass, entityName, randomID); | |
EntityRegistry.registerModEntity(entityClass, entityName, randomID, Blocklings.modInstance, 64, 1, true); | |
EntityRegistry.addSpawn(entityName, 50, 1, 1, EnumCreatureType.monster, | |
BiomeGenBase.birchForest, | |
BiomeGenBase.birchForestHills, | |
BiomeGenBase.coldBeach, | |
BiomeGenBase.coldTaiga, | |
BiomeGenBase.extremeHills, | |
BiomeGenBase.extremeHillsEdge, | |
BiomeGenBase.extremeHillsPlus, | |
BiomeGenBase.forest, | |
BiomeGenBase.forestHills, | |
BiomeGenBase.jungle, | |
BiomeGenBase.jungleEdge, | |
BiomeGenBase.jungleHills, | |
BiomeGenBase.megaTaiga, | |
BiomeGenBase.megaTaigaHills, | |
BiomeGenBase.plains, | |
BiomeGenBase.roofedForest, | |
BiomeGenBase.swampland, | |
BiomeGenBase.taiga, | |
BiomeGenBase.taigaHills); | |
CreateEgg(randomID, solidColour, spotColour); | |
} | |
private static void CreateEgg(int randomID, int solidColour, int spotColour) { | |
EntityList.entityEggs.put(Integer.valueOf(randomID), new EntityList.EntityEggInfo(randomID, solidColour, spotColour)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment