mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-12 08:08:34 +00:00
Remove hardcoding of world limits (#1199)
* Remove hardcoding of world limits - seems to be working fine without the datapack for world height changing - particular attention should be given to LocalBlockVectorSet and MathMan changes * update adapters * Override getMinY in various classes and ensure selections have a world attached to them * no message * Address comments - Fix for lighting mode 1 * A few more changes * Fix LocalBlockVectorSet * Fix range statement * Various fixes/comment-addressing - There's not much point in having a different file name now for history. We've broken it before... - Fix history read/write - Fix range on for loops in CharBlocks * undo bad CharBlocks change * Fix history y level * Fix biome history * Fix lighting * Fix /up * Make regen fail not because of these changes * Fixes for y < 0 * Fix isEmpty where only the uppermost chunksection is edited * Fix javadocs/FAWE annotations * Better explain why BiomeMath is removed * If history task throws an error, it should only be caught and printed if not completing now. * Min|max world heights for new patterns * Load biomes from NMS instead of bukkit (#1200) * Update adapters * Update adapters * Don't initialise BlockTypes when biomes aren't set up yet so all BiomeTypes.BIOME are no longer null thanks. * Address some comments. * rename layer -> sectionIndex to imply inclusivity * Javadoctored. Co-authored-by: NotMyFault <mc.cache@web.de> Co-authored-by: Hannes Greule <SirYwell@users.noreply.github.com>
This commit is contained in:
@ -5,9 +5,13 @@ import com.fastasyncworldedit.core.function.mask.AdjacentAnyMask;
|
||||
import com.fastasyncworldedit.core.function.mask.AdjacentMask;
|
||||
import com.sk89q.worldedit.WorldEdit;
|
||||
import com.sk89q.worldedit.command.util.SuggestionHelper;
|
||||
import com.sk89q.worldedit.entity.Player;
|
||||
import com.sk89q.worldedit.extension.input.InputParseException;
|
||||
import com.sk89q.worldedit.extension.input.ParserContext;
|
||||
import com.sk89q.worldedit.extension.platform.Locatable;
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
import com.sk89q.worldedit.function.mask.Mask;
|
||||
import com.sk89q.worldedit.world.World;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.stream.Stream;
|
||||
@ -43,7 +47,7 @@ public class AdjacentMaskParser extends RichParser<Mask> {
|
||||
max = min;
|
||||
}
|
||||
if (max >= 8 && min == 1) {
|
||||
return new AdjacentAnyMask(subMask);
|
||||
return new AdjacentAnyMask(subMask, context.getMinY(), context.getMaxY());
|
||||
}
|
||||
return new AdjacentMask(subMask, min, max);
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ public class RichOffsetMaskParser extends RichParser<Mask> {
|
||||
int y = Integer.parseInt(arguments[1]);
|
||||
int z = Integer.parseInt(arguments[2]);
|
||||
Mask submask = worldEdit.getMaskFactory().parseFromInput(arguments[3], context);
|
||||
return new OffsetMask(submask, BlockVector3.at(x, y, z));
|
||||
return new OffsetMask(submask, BlockVector3.at(x, y, z), context.getMinY(), context.getMaxY());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -58,10 +58,7 @@ public class OffsetPatternParser extends RichParser<Pattern> {
|
||||
} else {
|
||||
x = y = z = Integer.parseInt(arguments[1]);
|
||||
}
|
||||
Extent extent = context.requireExtent();
|
||||
int minY = extent.getMinY();
|
||||
int maxY = extent.getMaxY();
|
||||
return new OffsetPattern(inner, x, y, z, minY, maxY);
|
||||
return new OffsetPattern(inner, x, y, z, context.getMinY(), context.getMaxY());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -58,8 +58,7 @@ public class RandomOffsetPatternParser extends RichParser<Pattern> {
|
||||
} else {
|
||||
x = y = z = Integer.parseInt(arguments[1]);
|
||||
}
|
||||
Extent extent = context.requireExtent();
|
||||
return new RandomOffsetPattern(inner, x, y, z, extent.getMinY(), extent.getMaxY());
|
||||
return new RandomOffsetPattern(inner, x, y, z, context.getMinY(), context.getMaxY());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -41,8 +41,7 @@ public class RelativePatternParser extends RichParser<Pattern> {
|
||||
));
|
||||
}
|
||||
Pattern inner = this.worldEdit.getPatternFactory().parseFromInput(input[0], context);
|
||||
Extent extent = context.requireExtent();
|
||||
return new RelativePattern(inner, extent.getMinY(), extent.getMaxY());
|
||||
return new RelativePattern(inner, context.getMinY(), context.getMaxY());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -58,8 +58,7 @@ public class SolidRandomOffsetPatternParser extends RichParser<Pattern> {
|
||||
} else {
|
||||
x = y = z = Integer.parseInt(arguments[1]);
|
||||
}
|
||||
Extent extent = context.requireExtent();
|
||||
return new SolidRandomOffsetPattern(inner, x, y, z, extent.getMinY(), extent.getMaxY());
|
||||
return new SolidRandomOffsetPattern(inner, x, y, z, context.getMinY(), context.getMaxY());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -47,8 +47,7 @@ public class SurfaceRandomOffsetPatternParser extends RichParser<Pattern> {
|
||||
}
|
||||
Pattern inner = this.worldEdit.getPatternFactory().parseFromInput(arguments[0], context);
|
||||
int distance = Integer.parseInt(arguments[1]);
|
||||
Extent extent = context.requireExtent();
|
||||
return new SurfaceRandomOffsetPattern(inner, distance, extent.getMinY(), extent.getMaxY());
|
||||
return new SurfaceRandomOffsetPattern(inner, distance, context.getMinY(), context.getMaxY());
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user