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:
parent
2dab4b0a8b
commit
47541f7478
4 changed files with 8 additions and 10 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue