fixing random terragen crash? (was it block change event too big?)

This commit is contained in:
minjaesong
2021-02-25 10:15:37 +09:00
parent ed0bec0ee8
commit 5f16f71b0a
9 changed files with 44 additions and 38 deletions

View File

@@ -78,10 +78,10 @@ open class FixtureBase(
// if the collision type is allow_move_down, only the top surface tile should be "the platform"
// lower part must not have such property (think of the table!)
// TODO does this ACTUALLY work ?!
world.setTileTerrain(x, y, if (y == posY) BlockBox.ALLOW_MOVE_DOWN else BlockBox.NO_COLLISION)
world.setTileTerrain(x, y, if (y == posY) BlockBox.ALLOW_MOVE_DOWN else BlockBox.NO_COLLISION, false)
}
else
world.setTileTerrain(x, y, blockBox.collisionType)
world.setTileTerrain(x, y, blockBox.collisionType, false)
}
}
@@ -116,7 +116,7 @@ open class FixtureBase(
// remove filler block
for (x in posX until posX + blockBox.width) {
for (y in posY until posY + blockBox.height) {
world.setTileTerrain(x, y, Block.AIR)
world.setTileTerrain(x, y, Block.AIR, false)
}
}
@@ -157,7 +157,7 @@ open class FixtureBase(
for (x in posX until posX + blockBox.width) {
for (y in posY until posY + blockBox.height) {
if (world.getTileFromTerrain(x, y) == blockBox.collisionType) {
world.setTileTerrain(x, y, Block.AIR)
world.setTileTerrain(x, y, Block.AIR, false)
}
}
}

View File

@@ -80,7 +80,9 @@ object PlayerBuilderSigrid {
try {
inventory.add("wall@"+t, 9995)
}
catch (e: Throwable) {}
catch (e: Throwable) {
System.err.println("[PlayerBuilder] $e")
}
}
// item ids are defined in <module>/items/itemid.csv