This commit is contained in:
Leijurv 2018-08-13 13:49:05 -07:00
parent 532d4d1f31
commit 4eb46ebe0f
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -279,6 +279,10 @@ public class PathingBehavior extends Behavior {
float partialTicks = event.getPartialTicks(); float partialTicks = event.getPartialTicks();
long start = System.nanoTime(); long start = System.nanoTime();
PathExecutor current = this.current; // this should prevent most race conditions?
PathExecutor next = this.next; // like, now it's not possible for current!=null to be true, then suddenly false because of another thread
// TODO is this enough, or do we need to acquire a lock here?
// Render the current path, if there is one // Render the current path, if there is one
if (current != null && current.getPath() != null) { if (current != null && current.getPath() != null) {
int renderBegin = Math.max(current.getPosition() - 3, 0); int renderBegin = Math.max(current.getPosition() - 3, 0);