aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common
diff options
context:
space:
mode:
authorBlood-Asp <bloodasphendrik@gmail.com>2016-10-26 20:34:04 +0200
committerBlood-Asp <bloodasphendrik@gmail.com>2016-10-26 20:34:04 +0200
commit16f03e76e82cfbde8f3c355fa1224a3b88472f06 (patch)
tree9a22cebb60db50b021e38c5c4a414bced2cca730 /src/main/java/gregtech/common
parent8c1550e5c2c0a4a7c619a53704c3f2b22a790ee1 (diff)
downloadGT5-Unofficial-16f03e76e82cfbde8f3c355fa1224a3b88472f06.tar.gz
GT5-Unofficial-16f03e76e82cfbde8f3c355fa1224a3b88472f06.tar.bz2
GT5-Unofficial-16f03e76e82cfbde8f3c355fa1224a3b88472f06.zip
Allow max 1 crafting sound every 10 ticks to prevent rare crashes.
Diffstat (limited to 'src/main/java/gregtech/common')
-rw-r--r--src/main/java/gregtech/common/GT_Proxy.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java
index 00bc5ab0c1..00ee739ef1 100644
--- a/src/main/java/gregtech/common/GT_Proxy.java
+++ b/src/main/java/gregtech/common/GT_Proxy.java
@@ -173,6 +173,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
public int mPollutionPoisonLimit = 750000;
public int mPollutionVegetationLimit = 1000000;
public int mPollutionSourRainLimit = 2000000;
+ public int mTicksUntilNextCraftSound = 0;
public double mMagneticraftBonusOutputPercent = 100.0d;
private World mUniverse = null;
private final String aTextThermalExpansion = "ThermalExpansion";
@@ -1186,10 +1187,12 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
@SubscribeEvent
public void onWorldTickEvent(TickEvent.WorldTickEvent aEvent) {
+ if(aEvent.world.provider.dimensionId == 0)
+ mTicksUntilNextCraftSound--;
if (aEvent.side.isServer()) {
if (this.mUniverse == null) {
this.mUniverse = aEvent.world;
- }
+ }
if (this.isFirstServerWorldTick) {
File tSaveDiretory = getSaveDirectory();
if (tSaveDiretory != null) {