Renewables
This module can create regions in which destroyed or altered blocks will gradually be restored to their original state.
The <renewables>
tag can contain any number of <renewable>
tags.
Each <renewable>
can use a region and a filter to specify blocks to renew.
If neither are specified, the renewable affects all blocks in the world.
Renewables Element
Element | Description |
---|---|
<renewables> </renewables> | Node containing this map's renewable block rules. |
Sub-elements | Value/Children | |
---|---|---|
<renewable> | An individual renewable block rule. | Renewable Sub-elements |
Renewable Attributes
Attribute | Description | Value | Default |
---|---|---|---|
region | PropertyRegion in which blocks will be renewed. | Region | everywhere |
renew-filter | PropertyFilter which blocks are renewed. | Filter | Everything |
replace-filter | PropertyFilter which blocks can be replaced by renewing blocks. | Filter | Everything |
shuffle-filter | PropertyFilter which renewable blocks are shuffled. | Filter | Nothing |
rate | Approximate number of blocks that will be restored per second. This rate applies to the renewable as a whole, which means the time required for any single block to renew will depend on how many other blocks are waiting to be renewed by the same renewable. This parameter cannot be combined with interval . | blocks/second | 1 |
interval | Average time required for a block to renew. Unlike rate , this applies to each block individually, and blocks do not affect each other's renewal time. A renewable with an interval can behave very differently from a renewable with a rate , particularly if it is large.This parameter cannot be combined with rate . | Time Period | |
grow | Only allow blocks to be restored adjacent to other blocks that are already renewed, or not renewable. If set to false , blocks will be restored at completely random locations, even in mid-air. | true/false | true |
particles | Show block restore particle effects. | true/false | true |
sound | Play block restore sound effects. | true/false | true |
avoid-players | Prevent blocks from being restored within a specific number of distance from any player. | block | 2 |
Renewable Sub-elements
Element | Description | Value/Children |
---|---|---|
<region> | PropertyThe region the renewable applies to. | Bounded Regions |
<renew-filter> | PropertyFilter which blocks are renewed. | Filters |
<replace-filter> | PropertyFilter which blocks are replaced. | Filters |
<shuffle-filter> | PropertyFilter which blocks are shuffled. | Filters |
Examples
By default, all blocks in the region are renewable.
The <renew-filter>
sub-element can be used inside the <renewable>
to specify only particular blocks to renew.
The <replace-filter>
element specifies which block types are allowed to be replaced by renewing blocks.
Any other type of block in the renewable region will obstruct the renewal process.
By default, any block can be replaced.
Normally, blocks will be restored to their exact state when the map was loaded. If some block types are specified in
<shuffle-filter>
element, blocks of those types in the original region will be restored to a block type chosen at random from the shuffleable types.
The approximate proportions of block types from the original region will be preserved.
<renewables>
<renewable rate="2.5" grow="true" particles="true" sound="true" avoid-players="4">
<region>
<cylinder base="0,117,0" radius="6" height="13"/>
</region>
<!-- These are the blocks that will renew -->
<renew-filter>
<any>
<material>iron ore</material>
<material>glowstone</material>
<material>stone</material>
</any>
</renew-filter>
<!-- These blocks can be replaced by renewing blocks -->
<replace-filter>
<any>
<material>air</material>
<material>lava</material>
<material>stationary lava</material>
</any>
</replace-filter>
<!-- These blocks will switch with each other when they renew -->
<shuffle-filter>
<any>
<material>stone</material>
<material>iron ore</material>
</any>
</shuffle-filter>
</renewable>
</renewables>