2013-05-03 13:00:44 +00:00
|
|
|
package biomesoplenty.configuration;
|
|
|
|
|
2013-05-29 01:05:27 +00:00
|
|
|
import net.minecraft.entity.Entity;
|
|
|
|
import net.minecraft.entity.EntityEggInfo;
|
|
|
|
import net.minecraft.entity.EntityList;
|
|
|
|
import net.minecraft.entity.EnumCreatureType;
|
2013-05-03 13:00:44 +00:00
|
|
|
import biomesoplenty.BiomesOPlenty;
|
|
|
|
import biomesoplenty.api.Biomes;
|
2013-09-14 10:16:39 +00:00
|
|
|
import biomesoplenty.configuration.configfile.BOPConfigurationIDs;
|
2013-11-08 03:16:32 +00:00
|
|
|
import biomesoplenty.entities.EntityBird;
|
2013-06-15 08:46:50 +00:00
|
|
|
import biomesoplenty.entities.EntityGlob;
|
|
|
|
import biomesoplenty.entities.EntityJungleSpider;
|
2013-08-30 11:38:54 +00:00
|
|
|
import biomesoplenty.entities.EntityPhantom;
|
2013-11-16 12:50:29 +00:00
|
|
|
import biomesoplenty.entities.EntityPixie;
|
2013-06-15 08:46:50 +00:00
|
|
|
import biomesoplenty.entities.EntityRosester;
|
2013-10-27 06:20:58 +00:00
|
|
|
import biomesoplenty.entities.EntityWasp;
|
2013-07-03 07:51:39 +00:00
|
|
|
import biomesoplenty.entities.projectiles.EntityDart;
|
|
|
|
import biomesoplenty.entities.projectiles.EntityMudball;
|
|
|
|
import biomesoplenty.entities.projectiles.EntityPoisonDart;
|
2013-05-03 13:00:44 +00:00
|
|
|
import cpw.mods.fml.common.registry.EntityRegistry;
|
|
|
|
|
|
|
|
public class BOPEntities {
|
2013-05-31 10:34:02 +00:00
|
|
|
|
2013-05-03 13:00:44 +00:00
|
|
|
//Eggs
|
|
|
|
public static int eggIdCounter = 300;
|
2013-05-31 10:34:02 +00:00
|
|
|
|
2013-05-03 13:00:44 +00:00
|
|
|
//Find the first available egg ID after our egg ID counter
|
|
|
|
public static int getUniqueEntityEggId() {
|
|
|
|
do {
|
|
|
|
eggIdCounter++;
|
|
|
|
} while (EntityList.getStringFromID(eggIdCounter) != null);
|
|
|
|
|
|
|
|
return eggIdCounter;
|
|
|
|
}
|
2013-05-31 10:34:02 +00:00
|
|
|
|
2013-05-03 13:00:44 +00:00
|
|
|
@SuppressWarnings("unchecked")
|
|
|
|
public static void registerEntityEgg(Class<? extends Entity> entity, int primaryColor, int secondaryColor) {
|
|
|
|
int id = getUniqueEntityEggId();
|
|
|
|
EntityList.IDtoClassMapping.put(id, entity);
|
|
|
|
EntityList.entityEggs.put(id, new EntityEggInfo(id, primaryColor, secondaryColor));
|
|
|
|
}
|
2013-05-31 10:34:02 +00:00
|
|
|
|
2013-05-03 13:00:44 +00:00
|
|
|
public static void init()
|
2013-05-31 10:34:02 +00:00
|
|
|
{
|
2013-09-14 10:16:39 +00:00
|
|
|
EntityRegistry.registerModEntity(EntityMudball.class, "MudBall", BOPConfigurationIDs.entityMudballID, BiomesOPlenty.instance, 80, 3, true);
|
|
|
|
EntityRegistry.registerModEntity(EntityDart.class, "Dart", BOPConfigurationIDs.entityDartID, BiomesOPlenty.instance, 80, 3, true);
|
|
|
|
EntityRegistry.registerModEntity(EntityPoisonDart.class, "PoisonDart", BOPConfigurationIDs.entityPoisonDartID, BiomesOPlenty.instance, 80, 3, true);
|
2013-10-11 14:28:13 +00:00
|
|
|
|
|
|
|
if (BOPConfigurationIDs.jungleSpiderID > 0)
|
2013-05-03 13:00:44 +00:00
|
|
|
{
|
2013-10-11 14:28:13 +00:00
|
|
|
EntityRegistry.registerModEntity(EntityJungleSpider.class, "JungleSpider", BOPConfigurationIDs.jungleSpiderID, BiomesOPlenty.instance, 80, 3, true);
|
|
|
|
|
|
|
|
registerEntityEgg(EntityJungleSpider.class, 5147192, 11013646);
|
|
|
|
|
|
|
|
if (Biomes.bambooForest.isPresent() && Biomes.jungleNew.isPresent() && Biomes.tropicalRainforest.isPresent() && Biomes.oasis.isPresent() && Biomes.tropics.isPresent())
|
|
|
|
{
|
|
|
|
EntityRegistry.addSpawn(EntityJungleSpider.class, 8, 1, 3, EnumCreatureType.monster, Biomes.bambooForest.get(), Biomes.jungleNew.get(), Biomes.tropicalRainforest.get(), Biomes.oasis.get(), Biomes.tropics.get());
|
|
|
|
}
|
2013-05-03 13:00:44 +00:00
|
|
|
}
|
2013-10-11 14:28:13 +00:00
|
|
|
|
|
|
|
if (BOPConfigurationIDs.rosesterID > 0)
|
2013-05-17 09:59:08 +00:00
|
|
|
{
|
2013-10-11 14:28:13 +00:00
|
|
|
EntityRegistry.registerModEntity(EntityRosester.class, "Rosester", BOPConfigurationIDs.rosesterID, BiomesOPlenty.instance, 80, 3, true);
|
|
|
|
|
|
|
|
registerEntityEgg(EntityRosester.class, 14831439, 16756224);
|
|
|
|
|
|
|
|
if (Biomes.garden.isPresent())
|
|
|
|
{
|
|
|
|
EntityRegistry.addSpawn(EntityRosester.class, 10, 2, 4, EnumCreatureType.creature, Biomes.garden.get());
|
|
|
|
}
|
2013-05-17 09:59:08 +00:00
|
|
|
}
|
2013-10-11 14:28:13 +00:00
|
|
|
|
|
|
|
if (BOPConfigurationIDs.globID > 0)
|
2013-05-03 13:00:44 +00:00
|
|
|
{
|
2013-10-11 14:28:13 +00:00
|
|
|
EntityRegistry.registerModEntity(EntityGlob.class, "Glob", BOPConfigurationIDs.globID, BiomesOPlenty.instance, 80, 3, true);
|
|
|
|
|
|
|
|
registerEntityEgg(EntityGlob.class, 6836276, 8414787);
|
|
|
|
|
|
|
|
if (Biomes.bog.isPresent() && Biomes.deadSwamp.isPresent() && Biomes.fen.isPresent() && Biomes.moor.isPresent() && Biomes.quagmire.isPresent() && Biomes.sludgepit.isPresent() && Biomes.swamplandNew.isPresent())
|
|
|
|
{
|
|
|
|
EntityRegistry.addSpawn(EntityGlob.class, 1, 1, 1, EnumCreatureType.creature, Biomes.bog.get(), Biomes.deadSwamp.get(), Biomes.fen.get(), Biomes.moor.get(), Biomes.quagmire.get(), Biomes.sludgepit.get(), Biomes.swamplandNew.get());
|
|
|
|
}
|
2013-05-03 13:00:44 +00:00
|
|
|
}
|
2013-08-30 11:38:54 +00:00
|
|
|
|
2013-10-11 14:28:13 +00:00
|
|
|
if (BOPConfigurationIDs.phantomID > 0)
|
2013-08-30 11:38:54 +00:00
|
|
|
{
|
2013-10-11 14:28:13 +00:00
|
|
|
EntityRegistry.registerModEntity(EntityPhantom.class, "Phantom", BOPConfigurationIDs.phantomID, BiomesOPlenty.instance, 80, 3, true);
|
|
|
|
|
|
|
|
registerEntityEgg(EntityPhantom.class, 4472140, 2499368);
|
|
|
|
|
|
|
|
if (Biomes.netherBone.isPresent() && Biomes.netherDesert.isPresent())
|
|
|
|
{
|
2013-10-11 15:52:13 +00:00
|
|
|
EntityRegistry.addSpawn(EntityPhantom.class, 8, 1, 1, EnumCreatureType.monster, Biomes.netherBone.get(), Biomes.netherDesert.get());
|
2013-10-11 14:28:13 +00:00
|
|
|
}
|
2013-08-30 11:38:54 +00:00
|
|
|
}
|
2013-10-27 06:20:58 +00:00
|
|
|
|
|
|
|
if (BOPConfigurationIDs.waspID > 0)
|
|
|
|
{
|
|
|
|
EntityRegistry.registerModEntity(EntityWasp.class, "Wasp", BOPConfigurationIDs.waspID, BiomesOPlenty.instance, 80, 3, true);
|
|
|
|
|
2013-10-27 17:15:27 +00:00
|
|
|
registerEntityEgg(EntityWasp.class, 16434729, 2500135);
|
2013-10-27 06:20:58 +00:00
|
|
|
}
|
2013-11-08 03:16:32 +00:00
|
|
|
|
|
|
|
if (BOPConfigurationIDs.birdID > 0)
|
|
|
|
{
|
|
|
|
EntityRegistry.registerModEntity(EntityBird.class, "Bird", BOPConfigurationIDs.birdID, BiomesOPlenty.instance, 80, 3, true);
|
|
|
|
|
2013-11-08 06:10:37 +00:00
|
|
|
registerEntityEgg(EntityBird.class, 5277691, 16772788);
|
2013-11-08 03:16:32 +00:00
|
|
|
|
2013-11-14 07:50:25 +00:00
|
|
|
if (Biomes.promisedLandForest.isPresent() && Biomes.promisedLandSwamp.isPresent() && Biomes.promisedLandPlains.isPresent() && Biomes.promisedLandShrub.isPresent())
|
2013-11-08 03:16:32 +00:00
|
|
|
{
|
2013-11-14 07:50:25 +00:00
|
|
|
EntityRegistry.addSpawn(EntityBird.class, 10, 3, 5, EnumCreatureType.creature, Biomes.promisedLandForest.get(), Biomes.promisedLandSwamp.get(), Biomes.promisedLandPlains.get(), Biomes.promisedLandShrub.get());
|
2013-11-08 03:16:32 +00:00
|
|
|
}
|
|
|
|
}
|
2013-11-16 12:50:29 +00:00
|
|
|
|
|
|
|
if (BOPConfigurationIDs.pixieID > 0)
|
|
|
|
{
|
|
|
|
EntityRegistry.registerModEntity(EntityPixie.class, "Pixie", BOPConfigurationIDs.pixieID, BiomesOPlenty.instance, 80, 3, true);
|
|
|
|
|
|
|
|
registerEntityEgg(EntityPixie.class, 16560347, 16645116);
|
|
|
|
|
|
|
|
if (Biomes.promisedLandForest.isPresent() && Biomes.promisedLandSwamp.isPresent() && Biomes.promisedLandPlains.isPresent() && Biomes.promisedLandShrub.isPresent())
|
|
|
|
{
|
|
|
|
EntityRegistry.addSpawn(EntityPixie.class, 5, 1, 3, EnumCreatureType.monster, Biomes.promisedLandForest.get(), Biomes.promisedLandSwamp.get(), Biomes.promisedLandPlains.get(), Biomes.promisedLandShrub.get());
|
|
|
|
}
|
|
|
|
}
|
2013-05-03 13:00:44 +00:00
|
|
|
}
|
|
|
|
}
|