Updated to new BuildCraft API, Universal Cable BuildCraft support temporarily broken.

This commit is contained in:
Aidan Brady committed 2013-07-31 11:54:58 -04:00
1 parent db5588ddb9
commit c389f5bd34
62 files changed
+1027 -750

No files matched your search

@@ -13,7 +13,9 @@ import net.minecraft.world.World;
public class SafeTimeTracker {
private long lastMark = 0;
private long lastMark = Long.MIN_VALUE;
private long duration = 0;
private boolean marked;
/**
* Return true if a given delay has passed since last time marked was called successfully.
@@ -28,12 +30,18 @@ public class SafeTimeTracker {
lastMark = currentTime;
return false;
} else if (lastMark + delay <= currentTime) {
duration = currentTime - lastMark;
lastMark = world.getWorldTime();
marked = true;
return true;
} else
return false;
}
public long durationOfLastDelay(){
return marked ? duration : 0;
}
public void markTime(World world) {
lastMark = world.getWorldTime();