mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Add comment to Navigation patch on why its done that way
to avoid accidently changing it in future and breaking things
This commit is contained in:
parent
af73f87c66
commit
57be47c2d1
1 changed files with 3 additions and 0 deletions
|
@ -67,6 +67,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
- // NavigationAbstract navigationabstract = anavigationabstract1[k];
|
||||
- // Spigot end
|
||||
+ // Paper start
|
||||
+ // DO NOT USE AN ITERATOR! This must be a for (;;) to avoid CME.
|
||||
+ // This is perfectly safe, as additions are ok to be done in this iteration
|
||||
+ // And Removals are queued instead of immediate.
|
||||
+ for (int k = 0; k < this.navigators.size(); ++k) {
|
||||
+ NavigationAbstract navigationabstract = this.navigators.get(k);
|
||||
+ // Paper end
|
||||
|
|
Loading…
Reference in a new issue