worldgen: actually generating ores

This commit is contained in:
minjaesong
2023-10-26 15:37:48 +09:00
parent 2bd54c8316
commit 012d3482dc
17 changed files with 394 additions and 256 deletions

View File

@@ -582,6 +582,9 @@ open class GameWorld(
throw IllegalArgumentException("illegal mode input: $mode")
}
/**
* Will return (Block.AIR, 0) if there is no ore
*/
fun getTileFromOre(rawX: Int, rawY: Int): OrePlacement {
val (x, y) = coerceXY(rawX, rawY)
val (tileNum, placement) = layerOres.unsafeGetTile1(x, y)