-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apply dimensional height offset similar to the fabric mod
// Make people in other dimensions far away so that they're muted. val yAxisAdjuster = (world.registryKey.value.stableHash % 2048) * config.clientDimensionYAxisAdjust camPos[1] += yAxisAdjuster /** * A stable hash function designed for world IDs. * Different clients should be able to run this on the same world ID and get the same result. * * Based on the `djb2` hash function: [Hash Functions](http://www.cse.yorku.ca/~oz/hash.html) */ val Identifier.stableHash: Int get() { var hash = 5381 for (c in this.toString()) { hash += (hash shl 5) + c.code } return hash } fixes #35
- Loading branch information
zsawyer
committed
Jan 24, 2023
1 parent
b2cfed9
commit 82114ce
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters