Currently,
/fill <fromXYZ> <toXYZ> <target> replace [replacement]
If you don't specify specific blockstates for the target, it will target all matching blocks irrespective of their blockstates, and replace all variations with the specified replacement. This truncates all target blockstates with the replacement ones, including causing blockstate deletion if not specifying any replacement blockstates.
But what if you do want to match all variations, but replace only their material and want to preserve existing blockstate( value)s instead of completely overwriting them all?
I suggest to add another optional keyword at the end of the command such as "preserved", which if specified adds the effect of all blockstates and their values not specified by the replacement to be maintained for each replacement block that supports the blockstate/value pair. Such that:
/fill <fromXYZ> <toXYZ> stone_brick_stairs[waterlogged=true] replace stone_stairs[waterlogged=true] preserved
Would replace all orientations of stone stairs that are waterlogged with their waterlogged stone brick counterpart, preserving any existing "facing", "shape" and "half" blockstates in the targets. To accomplish this currently, a different command needs to be used for each and every possible value of each of those blockstates that you want to target at once. Which can be a total of 40 commands in this case of specifying the waterlogged one. With just "preserved" added to the command it can be reduced to 1 command.
Please sign in to leave a comment.
3 Comments