Created
October 12, 2011 08:30
-
-
Save Flow86/1280649 to your computer and use it in GitHub Desktop.
make BuildCraftEnergy reentrant
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/buildcraft/common/net/minecraft/src/BuildCraftEnergy.java b/buildcraft/common/net/minecraft/src/BuildCraftEnergy.java | |
index ba3440a..f515754 100755 | |
--- a/buildcraft/common/net/minecraft/src/BuildCraftEnergy.java | |
+++ b/buildcraft/common/net/minecraft/src/BuildCraftEnergy.java | |
@@ -34,6 +34,7 @@ import net.minecraft.src.forge.MinecraftForge; | |
import net.minecraft.src.forge.Property; | |
public class BuildCraftEnergy { | |
+ private static boolean initialized = false; | |
public final static int ENERGY_REMOVE_BLOCK = 25; | |
public final static int ENERGY_EXTRACT_ITEM = 2; | |
@@ -51,6 +52,15 @@ public class BuildCraftEnergy { | |
public static void ModsLoaded () { | |
BuildCraftCore.initialize(); | |
+ initialize(); | |
+ } | |
+ | |
+ public static void initialize() { | |
+ if (initialized) { | |
+ return; | |
+ } | |
+ | |
+ initialized = true; | |
Property engineId = BuildCraftCore.mainConfiguration | |
.getOrCreateBlockIdProperty("engine.id", |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment