Added missing mappings (#6810)

This commit is contained in:
Jake Potrebic
2021-11-04 07:08:53 -07:00
parent 7df969de65
commit 546ba82ea7
5 changed files with 109 additions and 32 deletions

View File

@@ -14,14 +14,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
private void ensureVisibility(Advancement advancement) {
+ // Paper start
+ e(advancement, IterationEntryPoint.ROOT);
+ ensureVisibility(advancement, IterationEntryPoint.ROOT);
+ }
+ private enum IterationEntryPoint {
+ ROOT,
+ ITERATOR,
+ PARENT_OF_ITERATOR
+ }
+ private void e(Advancement advancement, IterationEntryPoint entryPoint) {
+ private void ensureVisibility(Advancement advancement, IterationEntryPoint entryPoint) {
+ // Paper end
boolean flag = this.shouldBeVisible(advancement);
boolean flag1 = this.visible.contains(advancement);
@@ -33,7 +33,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- this.ensureVisibility(advancement.getParent());
+ // Paper start - If we're not coming from an iterator consider this to be a root entry, otherwise
+ // market that we're entering from the parent of an iterator.
+ this.e(advancement.getParent(), entryPoint == IterationEntryPoint.ITERATOR ? IterationEntryPoint.PARENT_OF_ITERATOR : IterationEntryPoint.ROOT);
+ this.ensureVisibility(advancement.getParent(), entryPoint == IterationEntryPoint.ITERATOR ? IterationEntryPoint.PARENT_OF_ITERATOR : IterationEntryPoint.ROOT);
}
+ // If this is true, we've went through a child iteration, entered the parent, processed the parent
@@ -48,7 +48,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
Advancement advancement1 = (Advancement) iterator.next();
- this.ensureVisibility(advancement1);
+ this.e(advancement1, IterationEntryPoint.ITERATOR); // Paper - Mark this call as being from iteration
+ this.ensureVisibility(advancement1, IterationEntryPoint.ITERATOR); // Paper - Mark this call as being from iteration
}
}