From b66dceb7e3973b9b65e13f3985bde33dd988007d Mon Sep 17 00:00:00 2001 From: Amnet Date: Fri, 11 Oct 2013 16:28:13 +0200 Subject: [PATCH] Added a possibility to disable mobs. --- common/biomesoplenty/ClientProxy.java | 24 +++++- .../configuration/BOPEntities.java | 73 +++++++++++-------- .../assets/biomesoplenty/lang/en_US.lang | 5 ++ 3 files changed, 68 insertions(+), 34 deletions(-) diff --git a/common/biomesoplenty/ClientProxy.java b/common/biomesoplenty/ClientProxy.java index 23671b650..5bfbdeac6 100644 --- a/common/biomesoplenty/ClientProxy.java +++ b/common/biomesoplenty/ClientProxy.java @@ -15,6 +15,7 @@ import biomesoplenty.blocks.renderers.PlantsRenderer; import biomesoplenty.blocks.renderers.PuddleRender; import biomesoplenty.blocks.renderers.RenderUtils; import biomesoplenty.blocks.renderers.SmallBlockRenderer; +import biomesoplenty.configuration.configfile.BOPConfigurationIDs; import biomesoplenty.entities.EntityGlob; import biomesoplenty.entities.EntityJungleSpider; import biomesoplenty.entities.EntityPhantom; @@ -49,10 +50,25 @@ public class ClientProxy extends CommonProxy { RenderingRegistry.registerEntityRenderingHandler(EntityMudball.class, new RenderSnowball(Items.mudball.get(), 0)); RenderingRegistry.registerEntityRenderingHandler(EntityDart.class, new RenderDart()); - RenderingRegistry.registerEntityRenderingHandler(EntityGlob.class, new RenderGlob(new ModelSlime(16), new ModelSlime(0), 0.25F)); - RenderingRegistry.registerEntityRenderingHandler(EntityJungleSpider.class, new RenderJungleSpider()); - RenderingRegistry.registerEntityRenderingHandler(EntityRosester.class, new RenderRosester(new ModelChicken(), 0.3F)); - RenderingRegistry.registerEntityRenderingHandler(EntityPhantom.class, new RenderPhantom()); + if (BOPConfigurationIDs.globID > 0) + { + RenderingRegistry.registerEntityRenderingHandler(EntityGlob.class, new RenderGlob(new ModelSlime(16), new ModelSlime(0), 0.25F)); + } + + if (BOPConfigurationIDs.jungleSpiderID > 0) + { + RenderingRegistry.registerEntityRenderingHandler(EntityJungleSpider.class, new RenderJungleSpider()); + } + + if (BOPConfigurationIDs.rosesterID > 0) + { + RenderingRegistry.registerEntityRenderingHandler(EntityRosester.class, new RenderRosester(new ModelChicken(), 0.3F)); + } + + if (BOPConfigurationIDs.phantomID > 0) + { + RenderingRegistry.registerEntityRenderingHandler(EntityPhantom.class, new RenderPhantom()); + } RenderingRegistry.registerBlockHandler(new FoliageRenderer()); RenderingRegistry.registerBlockHandler(new PlantsRenderer()); diff --git a/common/biomesoplenty/configuration/BOPEntities.java b/common/biomesoplenty/configuration/BOPEntities.java index 53bf2bd54..a003c234b 100644 --- a/common/biomesoplenty/configuration/BOPEntities.java +++ b/common/biomesoplenty/configuration/BOPEntities.java @@ -43,40 +43,53 @@ public class BOPEntities { 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); - - EntityRegistry.registerModEntity(EntityJungleSpider.class, "JungleSpider", BOPConfigurationIDs.jungleSpiderID, BiomesOPlenty.instance, 80, 3, true); - EntityRegistry.registerModEntity(EntityRosester.class, "Rosester", BOPConfigurationIDs.rosesterID, BiomesOPlenty.instance, 80, 3, true); - EntityRegistry.registerModEntity(EntityGlob.class, "Glob", BOPConfigurationIDs.globID, BiomesOPlenty.instance, 80, 3, true); - EntityRegistry.registerModEntity(EntityPhantom.class, "Phantom", BOPConfigurationIDs.phantomID, BiomesOPlenty.instance, 80, 3, true); - - registerEntityEgg(EntityJungleSpider.class, 5147192, 11013646); - registerEntityEgg(EntityRosester.class, 14831439, 16756224); - registerEntityEgg(EntityGlob.class, 6836276, 8414787); - registerEntityEgg(EntityPhantom.class, 4472140, 2499368); - - if (Biomes.bambooForest.isPresent() && Biomes.jungleNew.isPresent() && Biomes.tropicalRainforest.isPresent() && Biomes.oasis.isPresent() && Biomes.tropics.isPresent()) + + if (BOPConfigurationIDs.jungleSpiderID > 0) { - EntityRegistry.addSpawn(EntityJungleSpider.class, 8, 1, 3, EnumCreatureType.monster, Biomes.bambooForest.get(), Biomes.jungleNew.get(), Biomes.tropicalRainforest.get(), Biomes.oasis.get(), Biomes.tropics.get()); - } - - 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()); - } - - if (Biomes.garden.isPresent()) - { - EntityRegistry.addSpawn(EntityRosester.class, 10, 2, 4, EnumCreatureType.creature, Biomes.garden.get()); + 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()); + } } - if (Biomes.netherBone.isPresent() && Biomes.netherDesert.isPresent()) + if (BOPConfigurationIDs.rosesterID > 0) { - EntityRegistry.addSpawn(EntityPhantom.class, 65, 1, 1, EnumCreatureType.monster, Biomes.netherBone.get(), Biomes.netherDesert.get()); + 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()); + } + } + + if (BOPConfigurationIDs.globID > 0) + { + 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()); + } + } + + if (BOPConfigurationIDs.phantomID > 0) + { + EntityRegistry.registerModEntity(EntityPhantom.class, "Phantom", BOPConfigurationIDs.phantomID, BiomesOPlenty.instance, 80, 3, true); + + registerEntityEgg(EntityPhantom.class, 4472140, 2499368); + + if (Biomes.netherBone.isPresent() && Biomes.netherDesert.isPresent()) + { + EntityRegistry.addSpawn(EntityPhantom.class, 65, 1, 1, EnumCreatureType.monster, Biomes.netherBone.get(), Biomes.netherDesert.get()); + } } - - LanguageRegistry.instance().addStringLocalization("entity.BiomesOPlenty.JungleSpider.name", "en_US", "Jungle Spider"); - LanguageRegistry.instance().addStringLocalization("entity.BiomesOPlenty.Rosester.name", "en_US", "Rosester"); - LanguageRegistry.instance().addStringLocalization("entity.BiomesOPlenty.Glob.name", "en_US", "Glob"); - LanguageRegistry.instance().addStringLocalization("entity.BiomesOPlenty.Phantom.name", "en_US", "Phantom"); } } diff --git a/resources/assets/biomesoplenty/lang/en_US.lang b/resources/assets/biomesoplenty/lang/en_US.lang index 4ef0ea961..0738647cc 100644 --- a/resources/assets/biomesoplenty/lang/en_US.lang +++ b/resources/assets/biomesoplenty/lang/en_US.lang @@ -379,6 +379,11 @@ fluid.bop.springWater=Spring Water phrase.bop.promisedPortalOverworld=A gateway to the Promised Land has appeared in the sky above. phrase.bop.promisedPortalOther=A gateway to the Overworld has appeared in the sky above. +entity.BiomesOPlenty.Glob.name=Glob +entity.BiomesOPlenty.JungleSpider.name=Jungle Spider +entity.BiomesOPlenty.Phantom.name=Phantom +entity.BiomesOPlenty.Rosester.name=Rosester + itemGroup.tabBiomesOPlenty=Biomes O' Plenty generator.BIOMESOP=Biomes O' Plenty