aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech/api
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2018-05-29 15:16:19 +1000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2018-05-29 15:16:19 +1000
commitaaed15d6c833f634b785cad80913e8cd691cd88c (patch)
treeb15c4bf584e443543830473de6dabbfc54fa0b2a /src/Java/gtPlusPlus/xmod/gregtech/api
parent6b0f5931f685459ad83f26e0d19b648b9fa08b50 (diff)
downloadGT5-Unofficial-aaed15d6c833f634b785cad80913e8cd691cd88c.tar.gz
GT5-Unofficial-aaed15d6c833f634b785cad80913e8cd691cd88c.tar.bz2
GT5-Unofficial-aaed15d6c833f634b785cad80913e8cd691cd88c.zip
$ Small fixes.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_ThreadedSuperBuffer.java13
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/objects/GregtechBufferThread.java10
2 files changed, 13 insertions, 10 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_ThreadedSuperBuffer.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_ThreadedSuperBuffer.java
index 2151e5a109..7adcfb9683 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_ThreadedSuperBuffer.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_ThreadedSuperBuffer.java
@@ -1,7 +1,6 @@
package gtPlusPlus.xmod.gregtech.api.gui;
import gregtech.api.util.GT_Utility;
-import gregtech.common.tileentities.automation.GT_MetaTileEntity_ChestBuffer;
import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_ThreadedChestBuffer;
@@ -36,10 +35,10 @@ public class CONTAINER_ThreadedSuperBuffer extends GT_ContainerMetaTile_Machine
return null;
}
if (aSlotIndex == 0) {
- ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity
+ ((GT_MetaTileEntity_ThreadedChestBuffer) this.mTileEntity
.getMetaTileEntity()).bOutput = !((GT_MetaTileEntity_ThreadedChestBuffer) this.mTileEntity
.getMetaTileEntity()).bOutput;
- if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput) {
+ if (((GT_MetaTileEntity_ThreadedChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput) {
GT_Utility.sendChatToPlayer(aPlayer, this.trans("116", "Emit Energy to Outputside"));
} else {
GT_Utility.sendChatToPlayer(aPlayer, this.trans("117", "Don't emit Energy"));
@@ -47,10 +46,10 @@ public class CONTAINER_ThreadedSuperBuffer extends GT_ContainerMetaTile_Machine
return null;
}
if (aSlotIndex == 1) {
- ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity
+ ((GT_MetaTileEntity_ThreadedChestBuffer) this.mTileEntity
.getMetaTileEntity()).bRedstoneIfFull = !((GT_MetaTileEntity_ThreadedChestBuffer) this.mTileEntity
.getMetaTileEntity()).bRedstoneIfFull;
- if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull) {
+ if (((GT_MetaTileEntity_ThreadedChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull) {
GT_Utility.sendChatToPlayer(aPlayer, this.trans("118", "Emit Redstone if no Slot is free"));
} else {
GT_Utility.sendChatToPlayer(aPlayer, this.trans("119", "Don't emit Redstone"));
@@ -58,10 +57,10 @@ public class CONTAINER_ThreadedSuperBuffer extends GT_ContainerMetaTile_Machine
return null;
}
if (aSlotIndex == 2) {
- ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity
+ ((GT_MetaTileEntity_ThreadedChestBuffer) this.mTileEntity
.getMetaTileEntity()).bInvert = !((GT_MetaTileEntity_ThreadedChestBuffer) this.mTileEntity
.getMetaTileEntity()).bInvert;
- if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert) {
+ if (((GT_MetaTileEntity_ThreadedChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert) {
GT_Utility.sendChatToPlayer(aPlayer, this.trans("120", "Invert Redstone"));
} else {
GT_Utility.sendChatToPlayer(aPlayer, this.trans("121", "Don't invert Redstone"));
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) {