mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-12 08:18:35 +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:
@ -97,18 +97,18 @@ public class HeightMap {
|
||||
int bx = min.getBlockX();
|
||||
int bz = min.getBlockZ();
|
||||
Iterator<BlockVector2> flat = Regions.asFlatRegion(region).asFlatRegion().iterator();
|
||||
int layer = 0;
|
||||
int layer = session.getMinY();
|
||||
while (flat.hasNext()) {
|
||||
BlockVector2 pos = flat.next();
|
||||
int x = pos.getBlockX();
|
||||
int z = pos.getBlockZ();
|
||||
layer = session.getNearestSurfaceLayer(x, z, (layer + 7) >> 3, 0, maxY);
|
||||
layer = session.getNearestSurfaceLayer(x, z, (layer + 7) >> 3, session.getMinY(), maxY);
|
||||
data[(z - bz) * width + (x - bx)] = layer;
|
||||
}
|
||||
} else {
|
||||
// Store current heightmap data
|
||||
int index = 0;
|
||||
int yTmp = 255;
|
||||
int yTmp = session.getMaxY();
|
||||
for (int z = 0; z < height; ++z) {
|
||||
for (int x = 0; x < width; ++x, index++) {
|
||||
if (mask != null) {
|
||||
@ -324,7 +324,7 @@ public class HeightMap {
|
||||
int y0 = newHeight - 1;
|
||||
for (int setY = y0, getY = curHeight - 1; setY >= curHeight; setY--, getY--) {
|
||||
BlockState get;
|
||||
if (getY >= 0 && getY < 256) {
|
||||
if (getY >= session.getMinY() && getY <= session.getMaxY()) {
|
||||
get = session.getBlock(xr, getY, zr);
|
||||
} else {
|
||||
get = BlockTypes.AIR.getDefaultState();
|
||||
|
Reference in New Issue
Block a user