Temporarily switched to non-threaded ticker for MC 1.6

This commit is contained in:
Calclavia 2014-03-10 06:23:16 +08:00
parent 45207ae2bb
commit e5dcc4d5c0
2 changed files with 9 additions and 4 deletions

View file

@ -126,6 +126,7 @@ public class PartQuantumGlyph extends JCuboidPart implements TSlottedPart, JNorm
{ {
if (ticks == 0) if (ticks == 0)
FrequencyGrid.instance().register((IQuantumGate) tile()); FrequencyGrid.instance().register((IQuantumGate) tile());
ticks++; ticks++;
if (world().isRemote) if (world().isRemote)
@ -150,6 +151,7 @@ public class PartQuantumGlyph extends JCuboidPart implements TSlottedPart, JNorm
if (!world().isRemote) if (!world().isRemote)
{ {
transport(player); transport(player);
return true;
} }
} }
else else
@ -163,11 +165,12 @@ public class PartQuantumGlyph extends JCuboidPart implements TSlottedPart, JNorm
System.out.println(getQuantumTank()); System.out.println(getQuantumTank());
player.addChatMessage("Quantum Gate Frequency: " + frequency); player.addChatMessage("Quantum Gate Frequency: " + frequency);
} }
return false;
return true;
} }
} }
return true; return false;
} }
@Override @Override

View file

@ -1,6 +1,7 @@
package resonantinduction.core.grid; package resonantinduction.core.grid;
import universalelectricity.api.net.IUpdate; import universalelectricity.api.net.IUpdate;
import universalelectricity.core.net.NetworkTickHandler;
public class TickingGrid<N extends Node> extends NodeGrid<N> implements IUpdate public class TickingGrid<N extends Node> extends NodeGrid<N> implements IUpdate
{ {
@ -8,7 +9,8 @@ public class TickingGrid<N extends Node> extends NodeGrid<N> implements IUpdate
{ {
super(type); super(type);
add(node); add(node);
UpdateTicker.addNetwork(this); NetworkTickHandler.addNetwork(this);
// UpdateTicker.addNetwork(this);
} }
/** /**
@ -18,7 +20,7 @@ public class TickingGrid<N extends Node> extends NodeGrid<N> implements IUpdate
@Override @Override
public void update() public void update()
{ {
//synchronized (nodes) // synchronized (nodes)
{ {
for (Node node : nodes) for (Node node : nodes)
{ {