make structural multiblocks only update twice per second
@@ -94,7 +94,9 @@ public abstract class TileEntityStructuralMultiblock extends TileEntityMekanism
@Override
protected void onUpdateServer() {
super.onUpdateServer();
+ if (ticker % 10 == 0) {
String activeMultiblock = null;
+ if (!structures.isEmpty()) {
Iterator<Map.Entry<MultiblockManager<?>, Structure>> iterator = structures.entrySet().iterator();
while (iterator.hasNext()) {
Map.Entry<MultiblockManager<?>, Structure> entry = iterator.next();
@@ -107,6 +109,7 @@ public abstract class TileEntityStructuralMultiblock extends TileEntityMekanism
iterator.remove();
}
}
+ }
if (ticker >= 3 && structures.isEmpty()) {
invalidStructure.tick(this);
//If we managed to find any structures check which one is active
@@ -124,6 +127,7 @@ public abstract class TileEntityStructuralMultiblock extends TileEntityMekanism
sendUpdatePacket();
}
}
+ }
@Override
public ActionResultType onActivate(PlayerEntity player, Hand hand, ItemStack stack) {
