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