Show the blocks the world generates in the map and the 3D world, and drop the Height map view

Map tiles can carry the block on top of each column, read from chunks generated in memory through the world's own stages. The 2D map colours by them with a toolbar toggle and the 3D world gets a Blocks colouring with textures, both at a block a pixel or finer. The Height map view goes, as the 3D world shows heights; the Shading toggle keeps its icon under its own name.
This commit is contained in:
piexel committed 2026-11-11 02:45:01 +01:00
1 parent 0812c55425
commit 91f23c52b8
35 files changed
+567 -119

No files matched your search

@@ -33,8 +33,10 @@ import java.util.List;
* u32 header length | header, UTF-8 JSON | padding to 4 bytes
* i16 subjects[grid²] | padding to 4 | i16 regions[grid²] | padding to 4
* f32 heights[grid²], when the header says so | f32 pickNoise[grid²], when the header says so
* i16 ground[grid²] | padding to 4 | i16 cover[grid²], when the header names blocks
* </pre>
* The header holds the size, the scale, the subject kind and the labels the grids index. Every array starts on a
* The header holds the size, the scale, the subject kind, the labels the grids index, and the blocks the ground and
* cover grids index when the tile carries the tops of its columns. Every array starts on a
* multiple of 4 bytes, so the studio views them in place.
*/
final class MapTileEncoding {
@@ -46,33 +48,41 @@ final class MapTileEncoding {
static byte[] encode(MapTile tile, Gson gson) {
boolean hasHeights = tile.heights() != null;
boolean hasPickNoise = tile.pickNoise() != null;
MapTile.Blocks blocks = tile.blocks();
byte[] header = gson.toJson(new Header(tile.size(), tile.blocksPerPixel(), tile.subjectKind(), tile.labels(),
hasHeights, hasPickNoise))
hasHeights, hasPickNoise, blocks == null ? null : blocks.names()))
.getBytes(StandardCharsets.UTF_8);
int cells = tile.gridSize() * tile.gridSize();
int length = aligned(Integer.BYTES + header.length)
+ aligned(cells * Short.BYTES) * 2
+ (hasHeights ? cells * Float.BYTES : 0)
+ (hasPickNoise ? cells * Float.BYTES : 0);
+ (hasPickNoise ? cells * Float.BYTES : 0)
+ (blocks == null ? 0 : aligned(cells * Short.BYTES) * 2);
ByteBuffer buffer = ByteBuffer.allocate(length).order(ByteOrder.LITTLE_ENDIAN);
buffer.putInt(header.length).put(header);
align(buffer);
buffer.asShortBuffer().put(tile.subjects());
buffer.position(buffer.position() + cells * Short.BYTES);
align(buffer);
buffer.asShortBuffer().put(tile.regions());
buffer.position(buffer.position() + cells * Short.BYTES);
align(buffer);
putShorts(buffer, tile.subjects());
putShorts(buffer, tile.regions());
if (hasHeights) {
buffer.asFloatBuffer().put(tile.heights());
buffer.position(buffer.position() + cells * Float.BYTES);
}
if (hasPickNoise) {
buffer.asFloatBuffer().put(tile.pickNoise());
buffer.position(buffer.position() + cells * Float.BYTES);
}
if (blocks != null) {
putShorts(buffer, blocks.ground());
putShorts(buffer, blocks.cover());
}
return buffer.array();
}
private static void putShorts(ByteBuffer buffer, short[] grid) {
buffer.asShortBuffer().put(grid);
buffer.position(aligned(buffer.position() + grid.length * Short.BYTES));
}
private static int aligned(int bytes) {
return (bytes + ALIGNMENT_BYTES - 1) / ALIGNMENT_BYTES * ALIGNMENT_BYTES;
}
@@ -82,6 +92,6 @@ final class MapTileEncoding {
}
private record Header(int size, double blocksPerPixel, MapLabel.Kind subjectKind, List<MapLabel> labels,
boolean heights, boolean pickNoise) {
boolean heights, boolean pickNoise, List<String> blocks) {
}
}
@@ -22,6 +22,7 @@ import art.arcane.iris.core.gui.GuiHost;
import art.arcane.iris.core.gui.GuiMarker;
import art.arcane.iris.core.project.StudioEditor;
import art.arcane.iris.core.project.StudioEditorLauncher;
import art.arcane.iris.core.studio.map.BlockSource;
import art.arcane.iris.core.studio.map.MapHover;
import art.arcane.iris.core.studio.map.MapLabel;
import art.arcane.iris.core.studio.map.MapLayer;
@@ -86,6 +87,7 @@ import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.BooleanSupplier;
/**
* A studio app's connection to one world: HTTP on the loopback interface, on a free port, each request carrying the
@@ -591,11 +593,30 @@ public final class StudioBridge implements AutoCloseable {
throw new RequestError(STATUS_BAD_REQUEST, "The scale is " + SMALLEST_BLOCKS_PER_PIXEL + " to " + LARGEST_BLOCKS_PER_PIXEL + " blocks per pixel");
}
double tileBlocks = size * blocksPerPixel;
MapTile tile = session.renderer().render(layer, query.whole("x", 0) * tileBlocks, query.whole("z", 0) * tileBlocks,
blocksPerPixel, size, tileExtras(query), () -> closed || engine.isClosing() || engine.isClosed());
double startX = query.whole("x", 0) * tileBlocks;
double startZ = query.whole("z", 0) * tileBlocks;
BooleanSupplier cancelled = () -> closed || engine.isClosing() || engine.isClosed();
MapTile tile = session.renderer().render(layer, startX, startZ, blocksPerPixel, size, tileExtras(query), cancelled);
if (query.has("blocks")) {
tile = withBlocks(session, tile, startX, startZ, blockSource(query), cancelled);
}
return MapTileEncoding.encode(tile, gson);
}
private static MapTile withBlocks(StudioWorld.Session session, MapTile tile, double startX, double startZ, BlockSource source,
BooleanSupplier cancelled) {
try {
return session.renderer().withBlocks(tile, startX, startZ, source, cancelled);
} catch (IllegalArgumentException tooCoarse) {
throw new RequestError(STATUS_BAD_REQUEST, tooCoarse.getMessage());
}
}
private static BlockSource blockSource(Query query) {
return BlockSource.byId(query.text("blocks"))
.orElseThrow(() -> new RequestError(STATUS_BAD_REQUEST, "No block source " + query.text("blocks")));
}
private static Set<MapTile.Extra> tileExtras(Query query) {
Set<MapTile.Extra> extras = EnumSet.noneOf(MapTile.Extra.class);
if (query.flag("heights")) {
@@ -0,0 +1,49 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.core.studio.map;
import java.util.Arrays;
import java.util.Optional;
/** Where a tile's blocks come from. */
public enum BlockSource {
/** The chunks generated in memory: what the world would hold, at a block a pixel or finer. */
GENERATED("generated", 1D);
private final String id;
private final double largestBlocksPerPixel;
BlockSource(String id, double largestBlocksPerPixel) {
this.id = id;
this.largestBlocksPerPixel = largestBlocksPerPixel;
}
public String id() {
return id;
}
/** The coarsest scale the source is drawn at; a coarser tile would ask for more columns than it shows. */
public double largestBlocksPerPixel() {
return largestBlocksPerPixel;
}
public static Optional<BlockSource> byId(String id) {
return Arrays.stream(values()).filter(source -> source.id.equals(id)).findFirst();
}
}
@@ -0,0 +1,36 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.core.studio.map;
/** What lies on top of the world's columns, from one {@link BlockSource}. */
@FunctionalInterface
interface ColumnTops {
ColumnTop at(int worldX, int worldZ);
/**
* The top of one column.
*
* @param groundY the height of its ground block above the dimension's bottom
* @param ground the ground block's key, or null where the column holds no ground
* @param cover the key of the block standing on the ground, such as grass or a layer of snow, or null for none
*/
record ColumnTop(int groundY, String ground, String cover) {
static final ColumnTop NOTHING = new ColumnTop(0, null, null);
}
}
@@ -0,0 +1,108 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.core.studio.map;
import art.arcane.iris.engine.framework.Engine;
import art.arcane.iris.engine.framework.GenerationSessionLease;
import art.arcane.iris.spi.PlatformBiome;
import art.arcane.iris.spi.PlatformBlockState;
import art.arcane.iris.util.project.context.IrisContext;
import art.arcane.iris.util.project.hunk.Hunk;
import com.github.benmanes.caffeine.cache.Caffeine;
import com.github.benmanes.caffeine.cache.LoadingCache;
/**
* The tops of chunks generated for the studio alone: each chunk runs through the world's own stages into memory, so its
* columns hold what the world would, trees and structures included, and nothing is placed in the world. Generating
* plans the chunk's surroundings in the world's mantle, as generating it in the world would. A chunk is generated once
* and its top kept; asked for from several bridge threads at once.
*/
final class GeneratedChunks implements ColumnTops {
private static final int CHUNK_SHIFT = 4;
private static final int BLOCKS_ACROSS = 1 << CHUNK_SHIFT;
private static final int CHUNK_MASK = BLOCKS_ACROSS - 1;
// A chunk's top is about 5 KB, so this many stay under 50 MB.
private static final int MOST_CHUNKS_KEPT = 8192;
private static final String LEASE_NAME = "studio_block_preview";
private final Engine engine;
private final LoadingCache<Long, ChunkTop> tops;
GeneratedChunks(Engine engine) {
this.engine = engine;
this.tops = Caffeine.newBuilder().maximumSize(MOST_CHUNKS_KEPT).build(this::generate);
}
@Override
public ColumnTop at(int worldX, int worldZ) {
ChunkTop chunk = tops.get(keyOf(worldX >> CHUNK_SHIFT, worldZ >> CHUNK_SHIFT));
return chunk.columns[(worldZ & CHUNK_MASK) * BLOCKS_ACROSS + (worldX & CHUNK_MASK)];
}
private ChunkTop generate(long key) throws Exception {
int chunkX = (int) (key >> Integer.SIZE);
int chunkZ = (int) key;
int height = engine.getHeight();
Hunk<PlatformBlockState> blocks = Hunk.newArrayHunk(BLOCKS_ACROSS, height, BLOCKS_ACROSS);
Hunk<PlatformBiome> biomes = Hunk.newArrayHunk(BLOCKS_ACROSS, height, BLOCKS_ACROSS);
try (GenerationSessionLease lease = engine.acquireGenerationLease(LEASE_NAME);
IrisContext.Scope ignored = IrisContext.open(engine, lease.sessionId(), null)) {
engine.getGeneration().generate(chunkX << CHUNK_SHIFT, chunkZ << CHUNK_SHIFT, blocks, biomes, false, lease.sessionId());
}
return ChunkTop.of(blocks);
}
private static long keyOf(int chunkX, int chunkZ) {
return ((long) chunkX << Integer.SIZE) | (chunkZ & 0xFFFFFFFFL);
}
private record ChunkTop(ColumnTop[] columns) {
static ChunkTop of(Hunk<PlatformBlockState> blocks) {
ColumnTop[] columns = new ColumnTop[BLOCKS_ACROSS * BLOCKS_ACROSS];
for (int z = 0; z < BLOCKS_ACROSS; z++) {
for (int x = 0; x < BLOCKS_ACROSS; x++) {
columns[z * BLOCKS_ACROSS + x] = topOf(blocks, x, z);
}
}
return new ChunkTop(columns);
}
// The ground is the highest block something can stand on, so a tree's leaves and a roof count; what stands on it
// without being ground, such as grass or a layer of snow, is its cover.
private static ColumnTop topOf(Hunk<PlatformBlockState> blocks, int x, int z) {
for (int y = blocks.getHeight() - 1; y >= 0; y--) {
PlatformBlockState block = blocks.get(x, y, z);
if (!isGround(block)) {
continue;
}
PlatformBlockState above = y + 1 < blocks.getHeight() ? blocks.get(x, y + 1, z) : null;
return new ColumnTop(y, block.key(), isCover(above) ? above.key() : null);
}
return ColumnTop.NOTHING;
}
private static boolean isGround(PlatformBlockState block) {
return block != null && !block.isAir() && !block.isFluid() && block.isSolid();
}
private static boolean isCover(PlatformBlockState block) {
return block != null && !block.isAir() && !block.isFluid();
}
}
}
@@ -46,7 +46,7 @@ public final class MapPickInspection {
private MapPickInspection() {
}
/** @throws IllegalArgumentException for a view whose spots no noise picks, such as the height view */
/** @throws IllegalArgumentException for a view whose spots no noise picks, such as a biome layer's */
public static Inspection measure(Engine engine, MapLayer layer, Area area) {
if (layer.previews()) {
return measurePreview(engine, layer.previewRegion(), area);
@@ -56,7 +56,7 @@ public final class MapPickPath {
case LAND_BIOMES -> addListStep(path, engine, view, region, InferredType.LAND, x, z);
case SEA_BIOMES -> addListStep(path, engine, view, region, InferredType.SEA, x, z);
case CAVE_BIOMES -> addListStep(path, engine, view, region, InferredType.CAVE, x, z);
case BIOMES, REGIONS, HEIGHT -> addBaseBiomeSteps(path, engine, view, region, x, z);
case BIOMES, REGIONS -> addBaseBiomeSteps(path, engine, view, region, x, z);
}
return path;
}
@@ -31,11 +31,28 @@ import java.util.List;
* @param heights each cell's terrain height, or null when it was not asked for
* @param pickNoise each cell's noise value that settled its pick, 0 to 1 and NaN where nothing picked it; null when it
* was not asked for or the layer has none
* @param blocks the block on top of each cell's column, or null when none were asked for
*/
public record MapTile(int size, double blocksPerPixel, MapLabel.Kind subjectKind, List<MapLabel> labels,
short[] subjects, short[] regions, float[] heights, float[] pickNoise) {
short[] subjects, short[] regions, float[] heights, float[] pickNoise, Blocks blocks) {
public static final short NO_LABEL = -1;
/**
* The top of each cell's column.
*
* @param names the block keys the grids index
* @param ground each cell's ground block, or {@link #NO_BLOCK} where the column holds none
* @param cover the block standing on each cell's ground, such as grass, or {@link #NO_BLOCK}
*/
public record Blocks(List<String> names, short[] ground, short[] cover) {
public static final short NO_BLOCK = -1;
}
/** This tile with {@code blocks} on top of its columns, at {@code heights} where it carries heights. */
MapTile withBlocks(Blocks blocks, float[] heights) {
return new MapTile(size, blocksPerPixel, subjectKind, labels, subjects, regions, heights, pickNoise, blocks);
}
/** What a tile can carry besides its labels. */
public enum Extra {
HEIGHTS,
@@ -27,6 +27,7 @@ import art.arcane.iris.util.project.stream.ProceduralStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.IdentityHashMap;
import java.util.List;
import java.util.Map;
@@ -38,9 +39,11 @@ import java.util.function.BooleanSupplier;
/** Draws {@link MapTile}s of one engine's world. Safe to use from several threads; each tile is drawn on its caller's. */
public final class MapTileRenderer {
private final Engine engine;
private final GeneratedChunks generated;
public MapTileRenderer(Engine engine) {
this.engine = Objects.requireNonNull(engine, "engine");
this.generated = new GeneratedChunks(engine);
}
/**
@@ -69,6 +72,49 @@ public final class MapTileRenderer {
: renderView(layer, grid, blocksPerPixel, extras);
}
/**
* {@code tile}, drawn from ({@code startX}, {@code startZ}), with the block on top of each of its columns from
* {@code source}. Where the tile carries heights they become the heights of that ground, which is the terrain's
* with what generation put on it.
*
* @throws IllegalArgumentException when the tile is coarser than the source is drawn at
* @throws CancellationException as soon as {@code cancelled} answers true
*/
public MapTile withBlocks(MapTile tile, double startX, double startZ, BlockSource source, BooleanSupplier cancelled) {
double step = tile.blocksPerPixel();
if (step > source.largestBlocksPerPixel()) {
throw new IllegalArgumentException("Blocks from " + source.id() + " are drawn at " + source.largestBlocksPerPixel()
+ " blocks per pixel or finer");
}
TileGrid grid = new TileGrid(tile.gridSize(), startX - step, startZ - step, step, cancelled);
ColumnTops tops = topsOf(source);
int cells = grid.size() * grid.size();
short[] ground = new short[cells];
short[] cover = new short[cells];
float[] heights = tile.heights() == null ? null : new float[cells];
BlockNames names = new BlockNames();
for (int gridZ = 0; gridZ < grid.size(); gridZ++) {
checkCancelled(cancelled);
int worldZ = (int) Math.floor(grid.worldZ(gridZ));
for (int gridX = 0; gridX < grid.size(); gridX++) {
int cell = gridZ * grid.size() + gridX;
ColumnTops.ColumnTop top = tops.at((int) Math.floor(grid.worldX(gridX)), worldZ);
ground[cell] = names.indexOf(top.ground());
cover[cell] = names.indexOf(top.cover());
if (heights != null) {
heights[cell] = top.groundY();
}
}
}
return tile.withBlocks(new MapTile.Blocks(names.names(), ground, cover), heights);
}
private ColumnTops topsOf(BlockSource source) {
return switch (source) {
case GENERATED -> generated;
};
}
private MapTile renderView(MapLayer layer, TileGrid grid, double blocksPerPixel, Set<MapTile.Extra> extras) {
TileLabels labels = new TileLabels(engine, layer.colorType());
IrisComplex complex = engine.getComplex();
@@ -76,12 +122,12 @@ public final class MapTileRenderer {
short[] regions = everyCell(grid, (x, z) -> labels.indexOf(regionStream.get(x, z)));
ProceduralStream<IrisBiome> biomeStream = layer.view().biomeStream(complex);
short[] subjects = layer.labelsRegions() ? regions : everyCell(grid, (x, z) -> labels.indexOf(biomeStream.get(x, z)));
float[] heights = extras.contains(MapTile.Extra.HEIGHTS) || layer.view() == MapView.HEIGHT ? latticeHeights(grid) : null;
float[] heights = extras.contains(MapTile.Extra.HEIGHTS) ? latticeHeights(grid) : null;
float[] pickNoise = extras.contains(MapTile.Extra.PICK_NOISE) && layer.hasPickNoise()
? MapPickNoise.sample(engine, layer, grid)
: null;
MapLabel.Kind subjectKind = layer.labelsRegions() ? MapLabel.Kind.REGION : MapLabel.Kind.BIOME;
return new MapTile(grid.size() - 2, blocksPerPixel, subjectKind, labels.labels(), subjects, regions, heights, pickNoise);
return new MapTile(grid.size() - 2, blocksPerPixel, subjectKind, labels.labels(), subjects, regions, heights, pickNoise, null);
}
// Each spot's surface biome hangs on its height, which the lattice gives at a fraction of the exact heights' cost.
@@ -101,7 +147,7 @@ public final class MapTileRenderer {
? MapPickNoise.samplePreview(engine, region, grid, picks)
: null;
float[] requestedHeights = extras.contains(MapTile.Extra.HEIGHTS) ? heights : null;
return new MapTile(grid.size() - 2, blocksPerPixel, MapLabel.Kind.BIOME, labels.labels(), subjects, regions, requestedHeights, pickNoise);
return new MapTile(grid.size() - 2, blocksPerPixel, MapLabel.Kind.BIOME, labels.labels(), subjects, regions, requestedHeights, pickNoise, null);
}
private IrisComplex.BiomePick[] previewPicks(TileGrid grid, IrisRegion region, float[] heights) {
@@ -148,6 +194,25 @@ public final class MapTileRenderer {
short indexAt(double worldX, double worldZ);
}
/** The blocks one tile meets, each named once, in the order the tile met them. */
private static final class BlockNames {
private final Map<String, Short> indices = new HashMap<>();
private final List<String> names = new ArrayList<>();
short indexOf(String block) {
return block == null ? MapTile.Blocks.NO_BLOCK : indices.computeIfAbsent(block, this::add);
}
private short add(String block) {
names.add(block);
return (short) (names.size() - 1);
}
List<String> names() {
return List.copyOf(names);
}
}
/** The biomes and regions one tile meets, each labelled once, in the order the tile met them. */
private static final class TileLabels {
private final Engine engine;
@@ -30,7 +30,6 @@ import java.util.Optional;
public enum MapView {
BIOMES("biomes", "Biomes", "The biome at each spot, in the biome's colour", Group.WORLD, RenderType.BIOME),
REGIONS("regions", "Regions", "The region each spot belongs to", Group.WORLD, RenderType.REGION),
HEIGHT("height", "Height", "Terrain height, from deep water to snowy peaks", Group.WORLD, RenderType.HEIGHT),
LAND_BIOMES("landBiomes", "Land biomes", "The land biome each spot would get, also where the sea is",
Group.BIOME_LAYERS, RenderType.BIOME_LAND),
SEA_BIOMES("seaBiomes", "Sea biomes", "The sea biome each spot would get, also where the land is",
@@ -76,9 +75,9 @@ public enum MapView {
return this == REGIONS;
}
/** The colouring biomes and regions get in this view; the height view colours its biomes as the biome view does. */
/** The colouring biomes and regions get in this view. */
RenderType colorType() {
return this == HEIGHT ? RenderType.BIOME : colorType;
return colorType;
}
/** The biome each spot is labelled with: the base biome, before the height corrects it near coasts. */
@@ -87,7 +86,7 @@ public enum MapView {
case LAND_BIOMES -> complex.getLandBiomeStream();
case SEA_BIOMES -> complex.getSeaBiomeStream();
case CAVE_BIOMES -> complex.getCaveBiomeStream();
case BIOMES, REGIONS, HEIGHT -> complex.getBaseBiomeStream();
case BIOMES, REGIONS -> complex.getBaseBiomeStream();
};
}
@@ -184,8 +184,8 @@ public class StudioBridgeTest {
}
@Test
public void theHeightViewHasNoPicksToInspect() throws Exception {
assertEquals(400, get("picks?view=height&minX=0&minZ=0&maxX=10&maxZ=10").statusCode());
public void aBiomeLayerViewHasNoPicksToInspect() throws Exception {
assertEquals(400, get("picks?view=landBiomes&minX=0&minZ=0&maxX=10&maxZ=10").statusCode());
}
@Test
@@ -68,8 +68,8 @@ public class MapPickInspectionTest {
}
@Test
public void theHeightViewHasNoPicks() {
assertThrows(IllegalArgumentException.class, () -> measure(MapLayer.of(MapView.HEIGHT)));
public void aBiomeLayerViewHasNoPicks() {
assertThrows(IllegalArgumentException.class, () -> measure(MapLayer.of(MapView.LAND_BIOMES)));
}
@Test
@@ -96,10 +96,10 @@ public class MapTileRendererTest {
}
@Test
public void theHeightViewAlwaysHasHeightsAndAFlatWorldStaysFlat() {
public void aFlatWorldStaysFlat() {
heights((x, z) -> 70D);
MapTile tile = render(MapView.HEIGHT, 0D, 0D, 1D, false);
MapTile tile = render(MapView.BIOMES, 0D, 0D, 1D, true);
for (float height : tile.heights()) {
assertEquals(70F, height, 1e-4F);