Created
June 23, 2013 01:50
-
-
Save ft975/5843406 to your computer and use it in GitHub Desktop.
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
object MovingRegistry { | |
case class Key(world: World, pos: WorldPos){ | |
private lazy val hash = world.getWorldInfo.getDimension + pos.x * pos.y * pos.z | |
override def hashCode(): Int = { | |
hash | |
} | |
override def equals(obj: Any): Boolean = { | |
obj match { | |
case obj:Key => obj.world == world && obj.pos == pos | |
case _ => false | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment