diff --git a/core/src/main/java/com/boydti/fawe/jnbt/anvil/HeightMapMCAGenerator.java b/core/src/main/java/com/boydti/fawe/jnbt/anvil/HeightMapMCAGenerator.java index 1bd3afca..a81c00b9 100644 --- a/core/src/main/java/com/boydti/fawe/jnbt/anvil/HeightMapMCAGenerator.java +++ b/core/src/main/java/com/boydti/fawe/jnbt/anvil/HeightMapMCAGenerator.java @@ -121,11 +121,8 @@ public class HeightMapMCAGenerator implements Extent { return true; } - public int count; - @Override public boolean setBlock(int x, int y, int z, BaseBlock block) throws WorldEditException { - count++; int index = z * width + x; if (index < 0 || index >= heights.length) return false; int height = heights[index] & 0xFF; @@ -733,9 +730,14 @@ public class HeightMapMCAGenerator implements Extent { try { MCAChunk chunk = chunkStore.get(); int[] indexes = indexStore.get(); - for (byte[] array : chunk.ids) { - if (array != null) { - Arrays.fill(array, (byte) 0); + for (int i = 0; i < chunk.ids.length; i++) { + byte[] idsArray = chunk.ids[i]; + if (idsArray != null) { + Arrays.fill(idsArray, (byte) 0); + } + byte[] dataArray = chunk.data[i]; + if (dataArray != null) { + Arrays.fill(dataArray, (byte) 0); } } int index = 0; @@ -859,6 +861,7 @@ public class HeightMapMCAGenerator implements Extent { int maxYMod = 15 + (maxLayer << 4); for (int layer = (maxY >> 4) + 1; layer < 16; layer++) { chunk.ids[layer] = null; + chunk.data[layer] = null; } index = 0; { // Bedrock diff --git a/core/src/main/java/com/sk89q/worldedit/extent/Extent.java b/core/src/main/java/com/sk89q/worldedit/extent/Extent.java index 24fe494e..9e3e174d 100644 --- a/core/src/main/java/com/sk89q/worldedit/extent/Extent.java +++ b/core/src/main/java/com/sk89q/worldedit/extent/Extent.java @@ -175,11 +175,11 @@ public interface Extent extends InputExtent, OutputExtent { } default public void addOres(Region region, Mask mask) throws WorldEditException { - addOre(region, mask, new BlockPattern(BlockID.DIRT), 30, 4, 100, 0, 255); - addOre(region, mask, new BlockPattern(BlockID.GRAVEL), 30, 2, 100, 0, 255); - addOre(region, mask, new BlockPattern(BlockID.STONE, 1), 30, 4, 100, 0, 79); - addOre(region, mask, new BlockPattern(BlockID.STONE, 3), 30, 4, 100, 0, 79); - addOre(region, mask, new BlockPattern(BlockID.STONE, 5), 30, 4, 100, 0, 79); + addOre(region, mask, new BlockPattern(BlockID.DIRT), 33, 10, 100, 0, 255); + addOre(region, mask, new BlockPattern(BlockID.GRAVEL), 33, 8, 100, 0, 255); + addOre(region, mask, new BlockPattern(BlockID.STONE, 1), 33, 10, 100, 0, 79); + addOre(region, mask, new BlockPattern(BlockID.STONE, 3), 33, 10, 100, 0, 79); + addOre(region, mask, new BlockPattern(BlockID.STONE, 5), 33, 10, 100, 0, 79); addOre(region, mask, new BlockPattern(BlockID.COAL_ORE), 17, 20, 100, 0, 127); addOre(region, mask, new BlockPattern(BlockID.IRON_ORE), 9, 20, 100, 0, 63); addOre(region, mask, new BlockPattern(BlockID.GOLD_ORE), 9, 2, 100, 0, 31);