DoubleSlabs
DoubleSlabs copied to clipboard
(1.21.1) Fix crash when placing vertical slab into water
Fixes #311 - Vertical slabs crash the game when placed in water (and prevent reloading world)
It was trying to use the block state to index into a map of maps, but wasn't unsetting waterlogged on the indexing block state first, so it ended up dereferencing a null pointer.
From what I can see this fixes both the initial crash and the inability to load back into the world afterwards on all three loaders.
Presumably the same fix will have to be added for the other game versions too.