Kotlin for Forge

Kotlin for Forge

54M Downloads

HorizontalDirectionalBlock.FACING is null

Sunbread opened this issue ยท 4 comments

commented

I don't know where I went wrong, but when I try loading a block with BlockState HorizontalDirectionalBlock.FACING, the game crashes and tells me "Cannot invoke "net.minecraft.world.level.block.state.properties.Property.getName()" because "pProperty" is null".
The KFF version is 3.6.0. Using parchment mappings.

commented

I figured out. The BlockState is static so the impl in Kotlin must be in the companion object

commented

I figured out. The BlockState is static so the impl in Kotlin must be in the companion object

I suggest BlockState shoule be added in examples

commented

same as "BlockStateProperties.HORIZONTAL_FACING"

commented

I'm a little confused... could you send a snippet of what caused this crash? I think Java's static to Kotlin's companion objects is fairly straightforward