Better solution to the last commit

Don't even register the decorator if we aren't going to modify the
world.
This commit is contained in:
CovertJaguar 2013-01-31 23:10:14 -08:00
parent 2dab4b0a8b
commit 47541f7478
4 changed files with 8 additions and 10 deletions

View file

@ -258,8 +258,10 @@ public class BuildCraftCore {
ActionManager.registerTriggerProvider(new DefaultTriggerProvider());
ActionManager.registerActionProvider(new DefaultActionProvider());
MinecraftForge.EVENT_BUS.register(new SpringPopulate());
if (BuildCraftCore.modifyWorld) {
MinecraftForge.EVENT_BUS.register(new SpringPopulate());
}
if (BuildCraftCore.loadDefaultRecipes) {
loadRecipes();
}

View file

@ -87,7 +87,10 @@ public class BuildCraftEnergy {
@Init
public static void load(FMLInitializationEvent evt) {
NetworkRegistry.instance().registerGuiHandler(instance, new GuiHandler());
MinecraftForge.EVENT_BUS.register(new OilPopulate());
if (BuildCraftCore.modifyWorld) {
MinecraftForge.EVENT_BUS.register(new OilPopulate());
}
new BptBlockEngine(engineBlock.blockID);

View file

@ -22,9 +22,6 @@ public class SpringPopulate {
@ForgeSubscribe
public void populate(PopulateChunkEvent.Post event) {
if (!BuildCraftCore.modifyWorld) {
return;
}
boolean doGen = TerrainGen.populate(event.chunkProvider, event.world, event.rand, event.chunkX, event.chunkX, event.hasVillageGenerated, PopulateChunkEvent.Populate.EventType.CUSTOM);

View file

@ -37,10 +37,6 @@ public class OilPopulate {
}
public static void doPopulate(World world, Random rand, int x, int z) {
if (!BuildCraftCore.modifyWorld) {
return;
}
BiomeGenBase biomegenbase = world.getBiomeGenForCoords(x + 16, z + 16);
// Do not generate oil in the End