Skip to content

Placement restrictions

Li-aung Yip edited this page Mar 31, 2018 · 3 revisions

Replacement based on the ore dictionary

Use

<ReplacesOre block="name"/>

to replace blocks by their ore dictionary name. See a list of the commonly used ore dictionary names. The ore dictionary is a general block aliasing/abstraction mechanism that extends far beyond ores.

Replacement based on regular expressions

The original mod always used regular expressions on the block name. This became too confusing, and would slow down when many blocks were registered, so we moved it to a separate feature. To replace based on a regular expression match, use the <ReplacesRegexp> element.

Adjacency restrictions

One can restrict block placement based on whether a specific block is above, below or beside the current block. The basic elements are <PlacesAbove>, <PlacesBelow>, and <PlacesBeside>. These are specified just like <Replaces>, and there are <Ore> and <Regexp> variants of each. When one or more of these restrictions are added, they are combined with the others by a logical AND, i.e., all restrictions apply simultaneously. The weights are effectively multiplied. For the <PlacesBeside> restriction to be satisfied, it is sufficient for any block (north, south, east or west) to match (all four attempts are made).