deterministically random treegen

This commit is contained in:
minjaesong
2024-01-19 03:14:32 +09:00
parent 79bf88f0e8
commit 9f46fade1d
3 changed files with 34 additions and 31 deletions

View File

@@ -1071,7 +1071,7 @@ open class TerrarumIngame(batch: FlippingSpriteBatch) : IngameInstance(batch) {
}
}
private fun Point2iMod(x: Int, y: Int) = Point2i(x fmod world.width, y)
private fun Point2iMod(x: Int, y: Int) = Point2i(x fmod (world.width / CHUNK_W), y)
private fun updateWorldGenerator(actor: ActorWithBody) {
val pcx = (actor.intTilewiseHitbox.canonicalX.toInt() fmod world.width) / CHUNK_W