diff --git a/src/main/kotlin/gg/skytils/skytilsmod/features/impl/dungeons/solvers/terminals/AlignmentTaskSolver.kt b/src/main/kotlin/gg/skytils/skytilsmod/features/impl/dungeons/solvers/terminals/AlignmentTaskSolver.kt index 449017524..ae995b152 100644 --- a/src/main/kotlin/gg/skytils/skytilsmod/features/impl/dungeons/solvers/terminals/AlignmentTaskSolver.kt +++ b/src/main/kotlin/gg/skytils/skytilsmod/features/impl/dungeons/solvers/terminals/AlignmentTaskSolver.kt @@ -175,7 +175,7 @@ object AlignmentTaskSolver { val pos = entity.hangingPosition val pending = pendingClicks[pos] if (pending != null) { - val newRot = (event.packet.func_149376_c().find { it.dataValueId == 9 && it.objectType == 0 }?.`object` as? Byte ?: return).toInt() + val newRot = (event.packet.func_149376_c()?.find { it.dataValueId == 9 && it.objectType == 0 }?.`object` as? Byte ?: return).toInt() val currentRot = entity.rotation val delta = getTurnsNeeded(currentRot, newRot) val newPending = pending - delta diff --git a/src/main/kotlin/gg/skytils/skytilsmod/features/impl/slayer/SlayerFeatures.kt b/src/main/kotlin/gg/skytils/skytilsmod/features/impl/slayer/SlayerFeatures.kt index 792cb235d..93377555e 100644 --- a/src/main/kotlin/gg/skytils/skytilsmod/features/impl/slayer/SlayerFeatures.kt +++ b/src/main/kotlin/gg/skytils/skytilsmod/features/impl/slayer/SlayerFeatures.kt @@ -308,8 +308,8 @@ object SlayerFeatures : CoroutineScope { if (packet is S1CPacketEntityMetadata) { (slayer as? SeraphSlayer)?.run { if (packet.entityId == entity.entityId) { - if (entity.heldBlockState?.block == Blocks.beacon && ((packet.func_149376_c() - .find { it.dataValueId == 16 } ?: return).`object` as Short).toInt().and(65535) + if (entity.heldBlockState?.block == Blocks.beacon && ((packet.func_149376_c()?.find { it.dataValueId == 16 } ?: return) + .`object` as Short).toInt().and(65535) .and(4095) == 0 ) { lastYangGlyphSwitch = System.currentTimeMillis() @@ -324,7 +324,7 @@ object SlayerFeatures : CoroutineScope { } } if (Skytils.config.totemPing != 0 && packet.entityId == (slayer as? DemonlordSlayer)?.totemEntity?.entityId) { - ((packet.func_149376_c().find { it.dataValueId == 2 } ?: return).`object` as String).let { name -> + ((packet.func_149376_c()?.find { it.dataValueId == 2 } ?: return).`object` as String).let { name -> printDevMessage("totem name updating: $name", "totem") totemRegex.matchEntire(name)?.run { printDevMessage("time ${groups["time"]}", "totem") @@ -333,7 +333,7 @@ object SlayerFeatures : CoroutineScope { } } } else if (packet.entityId == (slayer as? DemonlordSlayer)?.entity?.entityId && - (((packet.func_149376_c().find { it.dataValueId == 0 } + (((packet.func_149376_c()?.find { it.dataValueId == 0 } ?: return).`object` as Byte).toInt() and 0x20) == 0 && slayer?.entity?.isInvisible == true ) {