From 45294d3b142ee990676f37dd62197d98d28385ca Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Sat, 10 Aug 2024 01:59:29 +0700 Subject: [PATCH] Make kotlin compiler happy due to java nullability annotations mismatch --- src/main/kotlin/ru/dbotthepony/mc/otm/graph/GraphNode.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/graph/GraphNode.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/graph/GraphNode.kt index 151f87c8d..6d549245e 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/graph/GraphNode.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/graph/GraphNode.kt @@ -7,6 +7,7 @@ import net.minecraft.core.Direction import net.minecraft.core.SectionPos import net.minecraft.server.level.ServerLevel import net.minecraft.world.level.block.entity.BlockEntity +import net.minecraft.world.level.block.state.BlockState import net.neoforged.neoforge.capabilities.BlockCapability import ru.dbotthepony.mc.otm.addTicker import ru.dbotthepony.mc.otm.core.math.plus @@ -169,7 +170,9 @@ open class GraphNode, G : GraphNodeList>(val graphFact if (!isValid) return level.addTicker { - isValid && !discoverStep(level, blockPos) { level.getCapability(capability, blockPos, level.getBlockState(blockPos), it, null) } + isValid && !discoverStep(level, blockPos) { + level.getCapability(capability as BlockCapability, blockPos, level.getBlockState(blockPos), it) + } } }