mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
fix: correctly handle creation of extents in EditSessionBuilder (#2232)
- Add regionExtent process to the queue (fixes #2227) - Correctly wrap extents in each other
This commit is contained in:
parent
1b0fb9ed48
commit
85f5006a0b
@ -531,16 +531,14 @@ public final class EditSessionBuilder {
|
||||
}
|
||||
if (allowedRegions == null && Settings.settings().REGION_RESTRICTIONS) {
|
||||
if (actor != null && !actor.hasPermission("fawe.bypass.regions")) {
|
||||
if (actor instanceof Player) {
|
||||
Player player = (Player) actor;
|
||||
if (actor instanceof Player player) {
|
||||
allowedRegions = player.getAllowedRegions();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (disallowedRegions == null && Settings.settings().REGION_RESTRICTIONS && Settings.settings().REGION_RESTRICTIONS_OPTIONS.ALLOW_BLACKLISTS) {
|
||||
if (actor != null && !actor.hasPermission("fawe.bypass.regions")) {
|
||||
if (actor instanceof Player) {
|
||||
Player player = (Player) actor;
|
||||
if (actor instanceof Player player) {
|
||||
disallowedRegions = player.getDisallowedRegions();
|
||||
}
|
||||
}
|
||||
@ -561,6 +559,9 @@ public final class EditSessionBuilder {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (placeChunks && regionExtent != null) {
|
||||
queue.addProcessor(regionExtent);
|
||||
}
|
||||
// There's no need to do the below (and it'll also just be a pain to implement) if we're not placing chunks
|
||||
if (placeChunks) {
|
||||
if (((relightMode != null && relightMode != RelightMode.NONE) || (relightMode == null && Settings.settings().LIGHTING.MODE > 0))) {
|
||||
@ -597,10 +598,9 @@ public final class EditSessionBuilder {
|
||||
this.extent = regionExtent;
|
||||
}
|
||||
if (this.limit != null && this.limit.STRIP_NBT != null && !this.limit.STRIP_NBT.isEmpty()) {
|
||||
if (placeChunks) {
|
||||
queue.addProcessor(new StripNBTExtent(this.extent, this.limit.STRIP_NBT));
|
||||
} else {
|
||||
this.extent = new StripNBTExtent(this.extent, this.limit.STRIP_NBT);
|
||||
if (placeChunks) {
|
||||
queue.addProcessor((IBatchProcessor) this.extent);
|
||||
}
|
||||
}
|
||||
if (this.limit != null && !this.limit.isUnlimited()) {
|
||||
@ -613,10 +613,9 @@ public final class EditSessionBuilder {
|
||||
}
|
||||
Set<PropertyRemap<?>> remaps = this.limit.REMAP_PROPERTIES;
|
||||
if (!limitBlocks.isEmpty() || (remaps != null && !remaps.isEmpty())) {
|
||||
if (placeChunks) {
|
||||
queue.addProcessor(new DisallowedBlocksExtent(this.extent, limitBlocks, remaps));
|
||||
} else {
|
||||
this.extent = new DisallowedBlocksExtent(this.extent, limitBlocks, remaps);
|
||||
if (placeChunks) {
|
||||
queue.addProcessor((IBatchProcessor) this.extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user