Skip to main content

Filter Apply Order

After proto 1.3.3 and above, the order that you apply filters to regions affects their behavior. Here is an example.

Let us start out with a basic filter that denies everything except TNT.

<all id="only-tnt">
<material>tnt</material>
</all>

Now let us apply this filter to Region A, and also apply a filter to Region B that denies all blocks.

<apply region="region-a" block="only-tnt"/>
<apply region="region-b" block="never"/>

However, there is one slight complication. Region B is inside of Region A. So which filter will override the other? This is where the apply order comes in handy.

An overview of two sample regions and a depiction of two possible apply orders that affect how the regions operate.

The order that you put the <apply> tags can change the outcome when something gets filtered. In the previous example, the only-tnt filter would always override the never filter since it is above it. The apply for region B won't get checked since it overlaps completely with region A and region A never returns abstain.

If we changed the order of the filters:

<apply region="region-b" block="never"/>
<apply region="region-a" block="only-tnt"/>

Now you cannot place blocks in Region B, but outside of it in Region A you can only place TNT blocks.

Although this may not be an issue for many maps such as a Blitz map or a TDM, this is a crucial concept for many DTC/DTM/CTW maps that use the <void/> filter. Usually it's best to have the <void/> filter at the lowest priority (at the bottom of the list).