Skip to content

Commit

Permalink
Fix EditSession initialisation without a World
Browse files Browse the repository at this point in the history
  • Loading branch information
me4502 committed Nov 4, 2023
1 parent 98d396f commit 19e8e80
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ public String getDisplayName() {
this.bypassNone = extent;
}

setReorderMode(this.reorderMode);
setReorderMode(ReorderMode.MULTI_STAGE);
}

private Extent traceIfNeeded(Extent input) {
Expand Down Expand Up @@ -372,6 +372,10 @@ public void enableStandardMode() {
*/
@Deprecated
public void setReorderMode(ReorderMode reorderMode) {
if (world == null && reorderMode == ReorderMode.FAST) {
// Fast requires a world, for now we can fallback to multi stage, but use "none" in the future.
reorderMode = ReorderMode.MULTI_STAGE;
}
if (reorderMode == ReorderMode.FAST && sideEffectExtent == null) {
throw new IllegalArgumentException("An EditSession without a fast mode tried to use it for reordering!");
}
Expand Down

0 comments on commit 19e8e80

Please sign in to comment.