fluid worldgen

This commit is contained in:
minjaesong
2024-09-10 02:13:13 +09:00
parent b3467d538c
commit 29c1a69222
12 changed files with 344 additions and 40 deletions

View File

@@ -874,7 +874,7 @@ open class GameWorld(
if (fluidID == Block.NULL || fluidID == Block.NOT_GENERATED)
fluidID = Fluid.NULL
return FluidInfo(fluidID, fill.let { if (it.isNaN()) 0f else it }) // hex FFFFFFFF (magic number for ungenerated tiles) is interpreted as Float.NaN
return FluidInfo(fluidID, if (fill.isNaN()) 0f else fill) // hex FFFFFFFF (magic number for ungenerated tiles) is interpreted as Float.NaN
}
/*private fun fluidTypeToBlock(type: FluidType) = when (type.abs()) {