Currently, you need the concrete type of a block to set, for example, the facing.
However, this isn't possible in cases where you don't know the concrete type of a block.
Properties don't have FromStr implemented either, so you can't go from a waterlogged=true to Waterlogged(true).
All in all, this makes it very hard (almost impossible I'd say) to implement a WorldEdit schematic parser, because you can't parse a value like this one: minecraft:birch_stairs[facing=east,half=bottom,shape=straight,waterlogged=false] to it's corresponding BlockState.
My current workaround is to use a LUT, taken from here.
Currently, you need the concrete type of a block to set, for example, the facing. However, this isn't possible in cases where you don't know the concrete type of a block. Properties don't have
FromStr
implemented either, so you can't go from awaterlogged=true
toWaterlogged(true)
.All in all, this makes it very hard (almost impossible I'd say) to implement a WorldEdit schematic parser, because you can't parse a value like this one:
minecraft:birch_stairs[facing=east,half=bottom,shape=straight,waterlogged=false]
to it's correspondingBlockState
.My current workaround is to use a LUT, taken from here.