Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/main/java/com/silvermoon/boxplusplus/boxplusplus.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import com.silvermoon.boxplusplus.common.CommonProxy;
import com.silvermoon.boxplusplus.common.loader.BlockRegister;
import com.silvermoon.boxplusplus.common.loader.RecipeLoader;

import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.SidedProxy;
Expand Down Expand Up @@ -65,7 +64,6 @@ public void postInit(FMLPostInitializationEvent event) {
// register server commands in this event handler (Remove if not needed)
public void serverStarting(FMLServerStartingEvent event) {
proxy.serverStarting(event);
new RecipeLoader().run();
}

public static final CreativeTabs BoxTab = new CreativeTabs("BoxPlusPlus") {
Expand Down
13 changes: 11 additions & 2 deletions src/main/java/com/silvermoon/boxplusplus/common/CommonProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.silvermoon.boxplusplus.common.config.Config;
import com.silvermoon.boxplusplus.common.loader.BlockRegister;
import com.silvermoon.boxplusplus.common.loader.RecipeLoader;
import com.silvermoon.boxplusplus.common.loader.TileEntitiesLoader;
import com.silvermoon.boxplusplus.network.NetworkLoader;
import com.silvermoon.boxplusplus.util.ResultModuleRequirement;
Expand All @@ -14,7 +15,9 @@

public class CommonProxy {

// preInit "Run before anything else. Read your config, create blocks, items, etc, and register them with the
private static boolean hasRunRecipeLoader = true;

// preInit "Run before anything else. Read your config, create blocks, items, etc., and register them with the
// GameRegistry." (Remove if not needed)
public void preInit(FMLPreInitializationEvent event) {
Config.synchronizeConfiguration(event.getSuggestedConfigurationFile());
Expand All @@ -34,5 +37,11 @@ public void postInit(FMLPostInitializationEvent event) {
}

// register server commands in this event handler (Remove if not needed)
public void serverStarting(FMLServerStartingEvent event) {}
public void serverStarting(FMLServerStartingEvent event) {
if (hasRunRecipeLoader) {
new RecipeLoader().run();
hasRunRecipeLoader = false;
}

}
}
Loading