PGM icon indicating copy to clipboard operation
PGM copied to clipboard

Allow to filter by original block in XML

Open rockymine opened this issue 4 years ago • 0 comments

Allow to filter by original block in XML

With this issue I propose the addition a new filter that allows for a mapmaker to filter whether a block has been been part of the original map (i.e. was not placed during the match). The filter would allow players to break and place blocks in a region, just like the block filter does. What differentiates this new filter from <apply block="..." .../> is that, if the specified block is part of the original map, the filter would not allow them to be broken.

This would be helpful for woolrooms especially. There may be some other useful applications as well. But this one is the first that came to my mind.

  • Example: You define a filter that allows to break and place oak planks and apply it to the woolroom. If the woolroom is partially built out of oak planks, players will be able to destroy that part of the woolroom. As a mapmaker you usually don't want this to happen.

As consequence you often deny players from placing this block in the woolroom (and allow others instead) or don't allow any changes to the woolroom at all. In some situations this restricts the creative freedom of the mapmaker or messes with the hotbar (Hopefully this makes sense to you).

TL;DR. It would be nice to have a filter that allows players to place a block that is also part of a structure. You should only be allowed to break blocks that were placed by the player, not the originals placed by the mapmaker.

How it would look in XML

<!-- normal filter -->
<any id="edit-region>
    <material>wood:1</material>
    <material>sandstone</material>
</any>
<!-- new apply -->
<apply block-original="edit-region" region="woolrooms" message="You may not interact with the original blocks!"/>

rockymine avatar Jul 15 '20 17:07 rockymine