[Bug]: `NbtFactory.readBlockState()` always returns null
spartacus04 opened this issue ยท 3 comments
- This issue is not solved in a development build
Describe the bug
When using the NbtFactory.readBlockState(block)
method null is always returned. Other NBT libraries such as Nbt Editor work with the same block.
To Reproduce
val compound = NbtFactory.readBlockState(location.block)
val startTickCount = compound.getLong("RecordStartTick") // NullPointerException: compound is null
Expected behavior
For compound to not be null
Version Info
https://pastebin.com/EhFTx597
Additional context
About the registered listener, you may notice in the dump that there's an additional minVersion
property, that's part of my plugin that extends the RecordPacketListener. However that part already works and doesn't influence the above code.
Should probably mark the method with @nullable
since it can return null values