From a81efdff0276468492b3e6fa0b2b7836ba1193dd Mon Sep 17 00:00:00 2001 From: alex_s168 <63254202+alex-s168@users.noreply.github.com> Date: Sat, 28 Sep 2024 09:28:53 +0200 Subject: [PATCH] a (#971) --- .../mod/compat/Weather2Compat.kt | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/common/src/main/kotlin/org/valkyrienskies/mod/compat/Weather2Compat.kt b/common/src/main/kotlin/org/valkyrienskies/mod/compat/Weather2Compat.kt index aa2ddb78..816c3e92 100644 --- a/common/src/main/kotlin/org/valkyrienskies/mod/compat/Weather2Compat.kt +++ b/common/src/main/kotlin/org/valkyrienskies/mod/compat/Weather2Compat.kt @@ -56,20 +56,18 @@ object Weather2Compat { applyForcePlusMotion() mgr.getStormsAround(pos, stormRange).forEach { - if (it is StormObject) { - runCatching { // prevent Cannot read field "listLayers" because "this.tornadoFunnelSimple" is null at weather2.weathersystem.storm.StormObject.spinObject(StormObject.java:2503) - forcePlusMotion = it.spinObject( - pos, - forcePlusMotion, - false, - stormDampen, - stormDampen, - false, - 0.0f, - ) + if (it is StormObject && it.tornadoFunnelSimple != null) { + forcePlusMotion = it.spinObject( + pos, + forcePlusMotion, + false, + stormDampen, + stormDampen, + true, + 0.0f, + ) - applyForcePlusMotion() - } + applyForcePlusMotion() } } }