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 4272869
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
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 4272869

Please sign in to comment.