mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
different randomising for different layers
This commit is contained in:
@@ -307,7 +307,7 @@ internal object BlocksDrawer {
|
||||
}
|
||||
|
||||
|
||||
private fun getHashCoord(x: Int, y: Int, mod: Int) = (XXHash64.hash(LandUtil.getBlockAddr(world, x, y).toBig64(), mod.toLong()) fmod mod.toLong()).toInt()
|
||||
private fun getHashCoord(x: Int, y: Int, mod: Int, layer: Int) = (XXHash64.hash(LandUtil.getBlockAddr(world, x, y).toBig64(), ((x*16777619) xor (y+1+layer)).toLong()) fmod mod.toLong()).toInt()
|
||||
|
||||
/**
|
||||
* Autotiling; writes to buffer. Actual draw code must be called after this operation.
|
||||
@@ -355,7 +355,7 @@ internal object BlocksDrawer {
|
||||
}
|
||||
|
||||
var hash = if ((mode == WALL || mode == TERRAIN) && !BlockCodex[world.tileNumberToNameMap[thisTile.toLong()]].hasTag("NORANDTILE"))
|
||||
getHashCoord(x, y, 8)
|
||||
getHashCoord(x, y, 8, mode)
|
||||
else 0
|
||||
|
||||
// draw a tile
|
||||
|
||||
Reference in New Issue
Block a user