diff --git a/src/block/utils/WallConnectionType.php b/src/block/utils/WallConnectionType.php new file mode 100644 index 000000000..60f2d01af --- /dev/null +++ b/src/block/utils/WallConnectionType.php @@ -0,0 +1,48 @@ +upgradeIntIdMeta(self::itemToBlockId($id), $variant & 0xf) !== null; + $blockStateData = GlobalBlockStateHandlers::getUpgrader()->upgradeIntIdMeta(self::itemToBlockId($id), $variant & 0xf); + if($blockStateData === null){ + return false; + } + try{ + GlobalBlockStateHandlers::getDeserializer()->deserialize($blockStateData); + return true; + }catch(BlockStateDeserializeException){ + return false; + } } return isset($this->list[self::getListOffset($id, $variant)]);