-
Notifications
You must be signed in to change notification settings - Fork 21
Presets
Presets are sections of the Blocklist.yml file describing how certain blocks should be regenerated, what they should drop and more.
You can name the preset anything you want for you to easily identify it.
Blocks:
mine_diamond:
target-material: DIAMOND_ORE
replace-block: STONE
regen-delay: 10
natural-break: truea preset named mine_diamond that regenerates diamond ore through stone after 10 seconds and drops the natural drops
All options are optional, if not provided their default values are used. At least one option has to be specified due to the nature of the YAML parser.
target-material The material of the block to regenerate, multiple presets can target the same material. That allows us to define different presets in more regions for the same block.
The value has to be a valid block material as after the 1.13 material flattening. Find a list of valid materials here.
target-material: DIAMOND_OREMultiple materials can be provided. If any of them match the block, it's regenerated according to this preset.
target-material: COAL_ORE;IRON_ORE;GOLD_OREThe name of the section can be used to define this property instead. However that removes the option to define multiple presets with the same target material.
Blocks:
DIAMOND_ORE:
replace-block: STONE
regen-delay: 10
natural-break: truea preset that regenerated diamond ore through stone after 10 seconds and drops the default drops
Star expansion can be used to easily target blocks whose names end the same way.
target-material: *_OREtarget all ores
This can be used while listing multiple materials as well.
target-material: *_ORE;STONE;COBBLESTONEreplace-block The material to replace the block with when regenerating.
replace-block: STONEDefault: AIR
regen-delay The time in seconds after which the block should be regenerated into the regenerate-into material specified.
regen-delay: 10Value of 0 regenerates the block immediately without replacing it with replace-block.
Value of -1 doesn't start the block's regeneration. This feature is meant to support manual regeneration (or scheduled through other plugins) with the /blockregen regen command.
Default: 3
regenerate-into Block material to regenerate the block into after the regeneration period specified by regen-delay has ended.
Default: the original type of the block
money Vault money reward the player should be given when breaking the block.
console-commands Console commands to be fired when this block is broken.
Allows to specify a chance for each command.
console-commands:
- "50 ; say Hello!"player-commands Player commands to be fired when this block is broken.
Allows to specify a chance for each command.
player-commands:
- "50 ; me Hello!"tool-required A list of tool materials this block can be broken with.
You can supply multiple different materials seperated by a comma.
tool-required: DIAMOND_PICKAXE, IRON_PICKAXEthe player would have to have a diamond or an iron pickaxe
enchants-required List of enchantments the tool is required to have in order to be allowed to break the block.
Multiple enchants with levels separated by a comma.
enchants-required: FORTUNE;2, MENDINGa player would have to have a tool with fortune 2 and mending
jobs-check A list of job levels required in order to break this block.
Requires Jobs Reborn installed.
jobs-check: Farmer;2particles Particle to display when the block is broken.
Valid options: flame_crown, witch_spell, fireworks, mystic_glare, sparkle_burst
particles: flame_crownregeneration-particles Particle to display when the block is regenerated.
Valid options: flame_crown, witch_spell, fireworks
regeneration-particles: flame_crownsound Sound to play when the block is broken.
Valid options here.
sound: AMBIENT_UNDERWATER_ENTERnatural-break When enabled, the usual drops and experience are dropped when the block is broken.
Default: true
drop-naturally When disabled (false), attempts to place block drops directly into the players inventory. If it's full, drops it on the ground as usual.
When enabled, drops the items from the block as normal.
Default: true
apply-fortune When disabled (false), doesn't apply fortune to custom drops.
Default: true
handle-crops When a block is broken under a crop, regenerate it as well. If a multiblock crop (cactus, sugarcane, bamboo,...) is broken, the plugin handles all of their blocks and regenerates them (according to the regenerate-whole setting). Setting it to false disables these behaviours.
Default: true
regenerate-whole When a multiblock crop is broken (cactus, sugar cane, bamboo,...) regenerate all of its blocks. When set to false, only the base block regenerates if broken.
Default: false
check-solid-ground When a block is broken under any crop, check for solid ground under the crop when regenerating. If the block under the crop is regenerating, wait for it.
Default: true
disable-physics Disable physics of blocks around this block. Useful for placing blocks above or on these blocks and making sure they stay after regeneration / replacement.
Default: false
Only available on versions >=1.13.2
drop-item Items that should drop from the block whene it's broken.
drop-item:
material: DIAMOND
name: "&3Special diamond"
amount: 1-3
lores:
- ""
- "&7Mined by &a%player%"
- ""drop 1 to 3 diamonds with a special name and lore
Multiple items can be supplied.
drop-item:
diamond:
material: DIAMOND
name: "&3Special diamond"
amount: 1-3
lores:
- ""
- "&7Mined by &a%player%"
- ""
stone:
material: STONEdrop 1 to 3 special diamonds along with a stone
conditions Conditions to allow breaking this block.
mine_diamond:
target-material: diamond_ore
regen-delay: 3
conditions-message: "You have to get stronger to mine this block..."
conditions:
tool:
material: diamond_pickaxe
placeholder: "%player_y% < 100"if the player doesn't have a diamond pickaxe and isn't below 100, the message is sent to him
A placeholder -- %condition% contains a reasonable-enough representation of the conditions.
conditions-message A message to send when the conditions fail the check.
mine_diamond:
target-material: diamond_ore
regen-delay: 3
conditions:
tool:
material: diamond_pickaxe
placeholder: "%player_y% < 100"Note that these features are supported within options that have them listed on this page.
Node data represents extra properties certain blocks can have - crop age, log rotation, etc.. BlockRegen supports only a selection of these.
For use in materials, provide them in square brackets after the material name
regenerate-into: wheat[age=3]When used in target-material, only blocks matching all specified properties will be regenerated.
In order to get the correct node data to use for configuration, use the command /blockregen check.
| key | values | description | version notes |
|---|---|---|---|
facing |
NORTH, EAST, SOUTH, WEST, UP, DOWN, NORTH_EAST, NORTH_WEST, SOUTH_EAST, SOUTH_WEST, WEST_NORTH_WEST, NORTH_NORTH_WEST, NORTH_NORTH_EAST, EAST_NORTH_EAST, EAST_SOUTH_EAST, SOUTH_SOUTH_EAST, SOUTH_SOUTH_WEST, WEST_SOUTH_WEST
|
direction for directionable blocks | |
age |
integer <0; max age>, max age depends on the crop |
crop age | |
skull |
explained here | skull texture for a player head | |
stairShape |
STRAIGHT, INNER_LEFT, INNER_RIGHT, OUTER_LEFT, OUTER_RIGHT
|
stair shape for stairs | >=1.13 |
axis |
X, Y, Z
|
axis for orientable blocks | >=1.13 |
powered |
true, false
|
whether a powerable block is powered | >=1.13 |
instrument |
PIANO, BASS_DRUM, SNARE_DRUM, STICKS, BASS_GUITAR, FLUTE, BELL, GUITAR, CHIME, XYLOPHONE, IRON_XYLOPHONE, COW_BELL, DIDGERIDOO, BIT, BANJO, PLING, ZOMBIE, SKELETON, CREEPER, DRAGON, WITHER_SKELETON, PIGLIN, CUSTOM_HEAD
|
note block instrument | >=1.13 |
noteId |
byte, <0; 255>
|
internal note id of a note block note | >=1.13 |
octave |
integer, <0; max int>
|
octave of a note block note | >=1.13 |
tone |
C, D, E, F, G, A, B, C
|
tone of a note block note | >=1.13 |
sharped |
true, false
|
whether a note block note is sharped | >=1.13 |
rotation |
NORTH, EAST, SOUTH, WEST, UP, DOWN, NORTH_EAST, NORTH_WEST, SOUTH_EAST, SOUTH_WEST, WEST_NORTH_WEST, NORTH_NORTH_WEST, NORTH_NORTH_EAST, EAST_NORTH_EAST, EAST_SOUTH_EAST, SOUTH_SOUTH_EAST, SOUTH_SOUTH_WEST, WEST_SOUTH_WEST
|
blocks that have a rotation | >=1.13 |
waterlogged |
true, false
|
waterlogged state | >=1.13 |
species |
GENERIC, REDWOOD, BIRCH, JUNGLE, ACACIA, DARK_OAK
|
tree species of wood | <1.13 |
inverted |
true, false
|
whether stairs are inverted or not | <1.13 |
flowerAmount |
integer <0; max amount>, max amount is 4 by default |
>=1.20 |
|
half |
TOP, BOTTOM
|
>=1.13 |
Skull textures are supported through the skull node data property. This can contain base64, player UUID, player name or a url (for ex. from https://minecraft-heads.com/custom-headshttps://minecraft-heads.com/custom-heads).
regenerate-into: player_head[skull=Wertik1206]regenerate-into: player_head[skull=365fbf1d-fb5b-3275-8d48-1c35666ba4f1]replace-block: player_head[skull=eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvY2IyOWNmM2JmMmYyNzk1MzM4OGQ5NTYzYmY5ZTgzYmIxYWVkZmM0NzA1ZjNmYTdjNzc0OGYwYTc5NzY2Y2Q5ZSJ9fX0]In most cases multiple materials can be provided.
regenerate-into: DIAMOND_ORE;GOLD_OREregenerate into diamond or gold ore with a 50/50 chance
You can split a 100% chance between these. The rest is split between other materials without chance provided.
regenerate-into: DIAMOND_ORE:32.5;GOLD_ORE:20;IRON_OREregenerate into diamond ore with a 32.5% chance, gold ore with a 20% chance or iron ore with a 47.5% chance
Amounts can be provided with a range. A random value will be generated within the bounds given.
regen-delay: 10-30regenerate after 10 to 30 seconds
Some placeholders are provided be default.
| Placeholder | Description |
|---|---|
%player% |
Name of the player. |
%player_x% |
X coordinate of the player. |
%player_y% |
y coordinate of the player. |
%player_z% |
z coordinate of the player. |
%player_world% |
World name of the player. |
%block_x% |
X coordinate of the broken block. |
%block_y% |
y coordinate of the broken block. |
%block_z% |
z coordinate of the broken block. |
%block_world% |
World name of the broken block. |
PlaceholderAPI placeholders are supported when the plugin is installed.
Properties in a section can either be in conjuctive form (all of them have to be true) or disjunctive (at least one has to be true). The base section and any other are always in a conjuctive form.
conditions:
tool:
material: DIAMOND_PICKAXE
placeholder: "%player_y% < 100"the tool has to be of the material diamond pickaxe AND the value of %player_y% placeholder has to be below 100
When listed (a line starts with -), conditions are in disjunctive form.
conditions:
tool:
material:
- DIAMOND_PICKAXE
- GOLDEN_PICKAXEthe tool has to be either a diamond pickaxe or a golden one
The relation between conditions can be changed with any and all sections.
conditions:
any:
- tool:
material: DIAMOND_PICKAXE
- placeholder: "%player_y% < 100"the tool is diamond pickaxe OR the player's y is below 100
conditions:
placeholder:
all:
- "%player_y% > 100"
- "%block_y% < 100"the player has to be above y 100 and the block below y 100
Conditions can be negated by prepending ^ to the name of the section.
conditions:
^tool:
material: DIAMOND_PICKAXEthe tool can be anything but a diamond pickaxe
Available default conditions: placeholder, tool (material, enchants), chance.
placeholder Allows a comparative math expression with placeholders. ex.: %player_y% > 10, %player_y% <= %player_x%. Available operators: <, >, <=, >=, ==, !=.
tool Compares against the player's tool. Available options: material, enchants.
tool.material Compares against the tool material.
tool.enchants Allows for comparative expressions with levels of the enchantments.
tool:
material: DIAMOND_PICKAXE
enchants:
- FORTUNE > 2
- EFFICIENCY > 2chance Chance out of 100% that this condition matches. ex.: chance: 40.
Conditions from other plugins are supported, check out the compatibility page for available plugin integrations.
conditions:
ia/tool: myitems:cool_pickaxeThere are two types of drops: vanilla and externally provided drops from other plugins. Options below are applicable to both.
amount
Amount of the item to drop.
drop-naturally Whether to add the item into the players inventory directly. This option overrides setting drop-naturally on the preset.
exp Experience to drop. The amount and whether to add the experience into the players inventory directly.
exp:
drop-naturally: true
amount: 10-100chance Chance out of 100% that this item gets dropped.
chance: 10.2Conditions can be applied to drops.
diamond:
material: diamond
amount: 1-3
conditions:
tool:
material: diamond_pickaxeOptions for vanilla minecraft drops.
material The material of the dropped item.
custom-model-data Custom model data, works on versions above 1.14.
name Custom name, supports placeholders, colors and hex (through the console format).
name: "§x§d§6§6§e§0§1Sand"item-model The path to a custom model in the loaded resource pack. Available on 1.21.2+.
More here.
item-model: "/assets/minecraft/items/iron_ingot"lores Custom lore, a list of lines, supports placeholders, colors and hex (through the console format).
lores:
- "§x§d§6§6§e§0§1Sand"enchants Enchantments to apply to the item. A list of enchants with their levels seperated by a colon.
enchants:
- FORTUNE:2
- UNBREAKING:2flags Item flags to apply to the item. Find options here.
flags:
- HIDE_ENCHANTSExample
material: DIAMOND
amount: 1-3
name: "&3Special diamond"
lores:
- "&7Mined by §x§2§a§8§8§d§6%player%"
drop-naturally: false
enchants:
- FORTUNE:2
flags:
- HIDE_ENCHANTS
exp:
amount: 10-30
drop-naturally: true
chance: 10drops a very special diamond with a chance of 10%
Drops from other plugins.
item identification of the item with the plugin. Has to start with a plugin prefix.
Example
item: ia:myitems:red_block
amount: 2
chance: 25
drop-naturally: trueputs 2 ItemsAdder items myitems:red_block with a chance of 25% into the player's inventory
Examples
regenerate-into: oraxen:caveblockdrop-item:
item: ia:myitems:red_blockComplete configured presets with descriptions.
Blocklist.yml
Blocks:
diamond:
target-material: DIAMOND_ORE
replace-block: STONE:30;COBBLESTONE
console-commands:
- "give %player% minecraft:stick 1"
tool-required: DIAMOND_PICKAXE
enchant-required: UNBREAKING;1
particles: flame_crown
sound: BLOCK_ANVIL_BREAK
regen-delay: 10-30
drop-naturally: false
natural-break: false
drop-item:
special_diamond:
material: DIAMOND
amount: 1-3
name: "&3Special diamond"
lores:
- "&7Mined by §x§2§a§8§8§d§6%player%"
drop-naturally: false
enchants:
- FORTUNE:2
flags:
- HIDE_ENCHANTS
exp:
amount: 10-30
drop-naturally: true
chance: 10
cobblestone:
material: COBBLESTONEwhen diamond ore is broken - check that the player has the right tool (diamond pickaxe with unbreaking >= 1). replace the block with either stone or cobblestone based on a 30/70 chance. run a give console command. show the flame_crown particles. play anvil break sound. drop a special diamond on a 10% chance and a stone in all cases. regenerate back into diamond ore after 10-30 seconds.