aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech/api/objects
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api/objects')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/objects/GregtechBufferThread.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/objects/GregtechBufferThread.java b/src/Java/gtPlusPlus/xmod/gregtech/api/objects/GregtechBufferThread.java
index 2d55e8d5ee..15f4ad503f 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/objects/GregtechBufferThread.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/objects/GregtechBufferThread.java
@@ -20,7 +20,7 @@ public class GregtechBufferThread extends Thread {
public static final Map<String, GregtechBufferThread> mBufferThreadAllocation = new HashMap<String, GregtechBufferThread>();
private final World mWorldRef;
- private short mLifeCycleTime = 12000;
+ private short mLifeCycleTime = 900;
public static synchronized final GregtechBufferThread getBufferThread(World world) {
if (world != null && mBufferThreadAllocation.containsKey(""+world.provider.dimensionId)){
@@ -33,6 +33,7 @@ public class GregtechBufferThread extends Thread {
}
public GregtechBufferThread(World world) {
+ super();
int mID = world != null ? world.provider.dimensionId : Short.MIN_VALUE;
if (world != null && !mBufferThreadAllocation.containsKey(""+mID)){
mWorldRef = world;
@@ -42,8 +43,11 @@ public class GregtechBufferThread extends Thread {
this.mLifeCycleTime = 1;
mWorldRef = null;
}
- this.setName("GTPP_SuperBuffer-Dim("+mID+"");
- Logger.INFO("[SB] Created a SuperBuffer Thread for dimension "+mID+".");
+ this.setName("GTPP_SuperBuffer-Dim("+mID+")");
+ if (mWorldRef != null && !this.isAlive()) {
+ this.start();
+ Logger.INFO("[SB] Created a SuperBuffer Thread for dimension "+mID+".");
+ }
}
public synchronized void fillStacksIntoFirstSlots(GT_MetaTileEntity_ThreadedChestBuffer mBuffer) {