Permalink
Browse files

Fix time compatibility with other dimensions

  • Loading branch information...
wormzjl committed Jul 3, 2017
1 parent f238a21 commit 87a85d31b6c3251cfe732fb6235bcbda979a3075
Showing with 11 additions and 0 deletions.
  1. +11 −0 src/Common/com/bioxx/tfc/Core/TFC_Time.java
@@ -4,6 +4,7 @@
import com.bioxx.tfc.api.TFCOptions;
import net.minecraftforge.common.DimensionManager;
public class TFC_Time
{
@@ -34,6 +35,7 @@
public static int currentMonth;
public static int currentYear;
private static long time;
private static long MainWorldTime;
public static final int JANUARY = 10;
public static final int FEBRUARY = 11;
@@ -87,6 +89,15 @@ public static void updateTime(World world)
world.getWorldInfo().setWorldTime(startTime);
world.getWorldInfo().incrementTotalWorldTime(startTime);
}
if(!world.isRemote)
{
MainWorldTime = DimensionManager.getWorld(0).getWorldInfo().getWorldTime();
if(time != MainWorldTime)
{
world.getWorldInfo().setWorldTime(MainWorldTime);
world.getWorldInfo().incrementTotalWorldTime(MainWorldTime);
}
}
int m = getMonth();
int m1 = m - 1;

0 comments on commit 87a85d3

Please sign in to comment.