Removed unused fields.
This commit is contained in:
+5
-12
@@ -21,6 +21,7 @@ package appeng.me.cache;
|
||||
import java.util.HashMap;
|
||||
import java.util.PriorityQueue;
|
||||
|
||||
import appeng.helpers.Reflected;
|
||||
import com.google.common.base.Preconditions;
|
||||
|
||||
import net.minecraft.crash.CrashReport;
|
||||
@@ -39,7 +40,6 @@ import appeng.me.cache.helpers.TickTracker;
|
||||
|
||||
public class TickManagerCache implements ITickManager {
|
||||
|
||||
private final IGrid myGrid;
|
||||
private final HashMap<IGridNode, TickTracker> alertable = new HashMap<>();
|
||||
private final HashMap<IGridNode, TickTracker> sleeping = new HashMap<>();
|
||||
private final HashMap<IGridNode, TickTracker> awake = new HashMap<>();
|
||||
@@ -47,12 +47,8 @@ public class TickManagerCache implements ITickManager {
|
||||
|
||||
private long currentTick = 0;
|
||||
|
||||
public TickManagerCache(final IGrid g) {
|
||||
this.myGrid = g;
|
||||
}
|
||||
|
||||
public long getCurrentTick() {
|
||||
return this.currentTick;
|
||||
@Reflected
|
||||
public TickManagerCache(@SuppressWarnings("unused") final IGrid g) {
|
||||
}
|
||||
|
||||
public long getAvgNanoTime(final IGridNode node) {
|
||||
@@ -66,7 +62,7 @@ public class TickManagerCache implements ITickManager {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return tt.getAvgNanos();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -146,7 +142,7 @@ public class TickManagerCache implements ITickManager {
|
||||
|
||||
Preconditions.checkNotNull(tr);
|
||||
|
||||
final TickTracker tt = new TickTracker(tr, gridNode, (IGridTickable) machine, this.currentTick, this);
|
||||
final TickTracker tt = new TickTracker(tr, gridNode, (IGridTickable) machine, this.currentTick);
|
||||
|
||||
if (tr.canBeAlerted) {
|
||||
this.alertable.put(gridNode, tt);
|
||||
@@ -184,9 +180,6 @@ public class TickManagerCache implements ITickManager {
|
||||
if (tt == null) {
|
||||
return false;
|
||||
}
|
||||
// throw new RuntimeException(
|
||||
// "Invalid alerted device, this node is not marked as alertable, or part of
|
||||
// this grid." );
|
||||
|
||||
// set to awake, this is for sanity.
|
||||
this.sleeping.remove(node);
|
||||
|
||||
+1
-9
@@ -27,7 +27,6 @@ import appeng.api.networking.ticking.IGridTickable;
|
||||
import appeng.api.networking.ticking.TickingRequest;
|
||||
import appeng.api.parts.IPart;
|
||||
import appeng.api.util.DimensionalCoord;
|
||||
import appeng.me.cache.TickManagerCache;
|
||||
|
||||
public class TickTracker implements Comparable<TickTracker> {
|
||||
|
||||
@@ -35,13 +34,10 @@ public class TickTracker implements Comparable<TickTracker> {
|
||||
private final IGridTickable gt;
|
||||
private final IGridNode node;
|
||||
|
||||
private final long LastFiveTicksTime = 0;
|
||||
|
||||
private long lastTick;
|
||||
private int currentRate;
|
||||
|
||||
public TickTracker(final TickingRequest req, final IGridNode node, final IGridTickable gt, final long currentTick,
|
||||
final TickManagerCache tickManagerCache) {
|
||||
public TickTracker(final TickingRequest req, final IGridNode node, final IGridTickable gt, final long currentTick) {
|
||||
this.request = req;
|
||||
this.gt = gt;
|
||||
this.node = node;
|
||||
@@ -49,10 +45,6 @@ public class TickTracker implements Comparable<TickTracker> {
|
||||
this.setLastTick(currentTick);
|
||||
}
|
||||
|
||||
public long getAvgNanos() {
|
||||
return (this.LastFiveTicksTime / 5);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(@Nonnull final TickTracker t) {
|
||||
int next = Long.compare(this.getNextTick(), t.getNextTick());
|
||||
|
||||
Reference in New Issue
Block a user