mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 20:31:51 +09:00
fix: touching the bottom of the world would crash the game because setFluid did not coerce the coords
This commit is contained in:
@@ -770,6 +770,8 @@ open class GameWorld(
|
||||
wallDamages[LandUtil.getBlockAddr(this, x, y)] ?: 0f
|
||||
|
||||
fun setFluid(x: Int, y: Int, fluidType: ItemID, fill: Float) {
|
||||
val (x, y) = coerceXY(x, y)
|
||||
|
||||
if (!fluidType.isFluid() && fluidType != Block.AIR) throw IllegalArgumentException("Fluid type is not actually fluid: $fluidType")
|
||||
|
||||
/*if (x == 60 && y == 256) {
|
||||
|
||||
Reference in New Issue
Block a user