mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-13 12:04:06 +09:00
fixing random terragen crash? (was it block change event too big?)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user