fix: crash on startup
This commit is contained in:
parent
e60de5a03a
commit
03861f193b
@ -49,8 +49,8 @@ object NoiseProjection {
|
||||
|
||||
init {
|
||||
ClientTickEvent.CLIENT_POST.register { game ->
|
||||
val player = game.player!!
|
||||
val random = game.level!!.random
|
||||
val player = game.player ?: return@register
|
||||
val random = (game.level ?: return@register).random
|
||||
val projections = Projector.findNearbyProjections(player.level(), player.blockPosition(), effect.get())
|
||||
if (projections.isNotEmpty()) {
|
||||
val rate = projections.maxOf { it.rate }
|
||||
|
Loading…
Reference in New Issue
Block a user