Various net crashes fixed

This commit is contained in:
Anuken
2018-07-03 13:13:02 -04:00
parent 3597860074
commit 4a626bc920
5 changed files with 12 additions and 4 deletions

View File

@@ -99,7 +99,9 @@ public interface BuilderTrait {
/**Return the build requests currently active, or the one at the top of the queue.
* May return null.*/
default BuildRequest getCurrentRequest(){
return getPlaceQueue().size == 0 ? null : getPlaceQueue().first();
synchronized (getPlaceQueue()) {
return getPlaceQueue().size == 0 ? null : getPlaceQueue().first();
}
}
/**Update building mechanism for this unit.