Readded configurable biome size

This commit is contained in:
Adubbz 2014-01-16 07:55:17 +11:00
parent cbc6fd568a
commit 3a9e20d387
4 changed files with 33 additions and 3 deletions

View file

@ -10,6 +10,7 @@ import biomesoplenty.common.eventhandler.misc.BonemealEventHandler;
import biomesoplenty.common.eventhandler.misc.CapeEventHandler; import biomesoplenty.common.eventhandler.misc.CapeEventHandler;
import biomesoplenty.common.eventhandler.potions.PotionParalysisEventHandler; import biomesoplenty.common.eventhandler.potions.PotionParalysisEventHandler;
import biomesoplenty.common.eventhandler.potions.PotionPossessionEventHandler; import biomesoplenty.common.eventhandler.potions.PotionPossessionEventHandler;
import biomesoplenty.common.eventhandler.world.BiomeSizeEventHandler;
import biomesoplenty.common.eventhandler.world.DecorateBiomeEventHandler; import biomesoplenty.common.eventhandler.world.DecorateBiomeEventHandler;
import biomesoplenty.common.eventhandler.world.DecorationModificationEventHandler; import biomesoplenty.common.eventhandler.world.DecorationModificationEventHandler;
import biomesoplenty.common.eventhandler.world.MapGenEventHandler; import biomesoplenty.common.eventhandler.world.MapGenEventHandler;
@ -30,6 +31,7 @@ public class BOPEventHandlers
{ {
MinecraftForge.EVENT_BUS.register(new DecorateBiomeEventHandler()); MinecraftForge.EVENT_BUS.register(new DecorateBiomeEventHandler());
MinecraftForge.TERRAIN_GEN_BUS.register(new DecorationModificationEventHandler()); MinecraftForge.TERRAIN_GEN_BUS.register(new DecorationModificationEventHandler());
MinecraftForge.TERRAIN_GEN_BUS.register(new BiomeSizeEventHandler());
MinecraftForge.TERRAIN_GEN_BUS.register(new VillageMaterialEventHandler()); MinecraftForge.TERRAIN_GEN_BUS.register(new VillageMaterialEventHandler());
MinecraftForge.TERRAIN_GEN_BUS.register(new MapGenEventHandler()); MinecraftForge.TERRAIN_GEN_BUS.register(new MapGenEventHandler());
} }

View file

@ -4,9 +4,9 @@ import net.minecraft.world.gen.structure.MapGenVillage;
import biomesoplenty.common.configuration.BOPConfigurationTerrainGen; import biomesoplenty.common.configuration.BOPConfigurationTerrainGen;
import cpw.mods.fml.relauncher.ReflectionHelper; import cpw.mods.fml.relauncher.ReflectionHelper;
public class BOPMapGenVillage extends MapGenVillage public class BOPMapGenVillageEventHandler extends MapGenVillage
{ {
public BOPMapGenVillage() public BOPMapGenVillageEventHandler()
{ {
super(); super();

View file

@ -0,0 +1,28 @@
package biomesoplenty.common.eventhandler.world;
import net.minecraftforge.event.terraingen.WorldTypeEvent.BiomeSize;
import biomesoplenty.common.configuration.BOPConfigurationTerrainGen;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
public class BiomeSizeEventHandler
{
@SubscribeEvent
public void onDetermineBiomeSize(BiomeSize event)
{
if (event.worldType.getWorldTypeName() == "BIOMESOP" || event.worldType.getWorldTypeName() == "ATG")
{
event.newSize = (byte)BOPConfigurationTerrainGen.biomeSize;
if (BOPConfigurationTerrainGen.netherOverride)
{
//DimensionManager.unregisterProviderType(-1);
//DimensionManager.registerProviderType(-1, WorldProviderBOPhell.class, true);
}
}
else
{
//DimensionManager.unregisterProviderType(-1);
//DimensionManager.registerProviderType(-1, WorldProviderHell.class, true);
}
}
}

View file

@ -11,7 +11,7 @@ public class MapGenEventHandler
{ {
if (event.type == EventType.VILLAGE) if (event.type == EventType.VILLAGE)
{ {
event.newGen = new BOPMapGenVillage(); event.newGen = new BOPMapGenVillageEventHandler();
} }
} }
} }