Skip to content

Instantly share code, notes, and snippets.

@Flow86
Created October 12, 2011 08:30
Show Gist options
  • Save Flow86/1280649 to your computer and use it in GitHub Desktop.
Save Flow86/1280649 to your computer and use it in GitHub Desktop.
make BuildCraftEnergy reentrant
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