### Complete Vanilla Drop Example Source: https://github.com/wertik/blockregen/wiki/Presets A comprehensive example of a vanilla item drop configuration. ```yml 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 ``` -------------------------------- ### Initialize local dependencies Source: https://github.com/wertik/blockregen/blob/master/README.md Run this command to install local dependencies required for development, as they are not available in a public repository. ```bash mvn initialize ``` -------------------------------- ### Define a Block Preset Source: https://github.com/wertik/blockregen/wiki/Presets Example of a complete block preset configuration in YAML. ```yml Blocks: mine_diamond: target-material: DIAMOND_ORE replace-block: STONE regen-delay: 10 natural-break: true ``` -------------------------------- ### Full Blocklist.yml Configuration Source: https://github.com/wertik/blockregen/wiki/Complete-Example A complete configuration example demonstrating all available features for a block, including regeneration settings, rewards, requirements, custom drops, and event handling. ```yaml Blocks: # The block that gets broken DIAMOND_ORE: # The block to replace it with. replace-block: STONE # The delay in which this block regenerates to its original block type in seconds. # Should be kept above 1 regen-delay: 7 # Vault money given to player when he breaks the block. # Requires Vault and an Economy plugin installed. money: 100 # Command(s) executed by console once the block is broken. console-commands: - 'say The console-command function is working!' # Command(s) executed by the player. player-commands: - 'me I, %player%, executed this command' # Tools required to break this block. # If they don't have this tool they get an error message (Messages.yml) tool-required: DIAMOND_PICKAXE, IRON_PICKAXE # Enchants required to break the block. # You can, but don't have to, specify a minimum level required . # If they don't have this enchant they get an error message (Messages.yml) enchant-required: FORTUNE;2, MENDING # Jobs Requirement # You can check what job and what level a player needs to be. # ex. #jobs-check: Farmer;2 # Remove the comment to enable ^^ # On break there can be particles displayed. # Available particles as of ${project.version}: flame_crown, witch_spell, fireworks particles: flame_crown # Sound to play on location when the block is broken. # Available sounds as of ${project.version}: https://github.com/CryptoMorin/XSeries/blob/master/src/main/java/com/cryptomorin/xseries/XSound.java sound: ENTITY_EXPERIENCE_ORB_PICKUP # Give drops, exp and amount as it would be in vanilla. # Set this to false to use custom drops. natural-break: false # Affects all item drops, except for events. # false == places the item in players inventory, if it's full, drops it on the ground. # true == drops it on the ground. drop-naturally: false # Only works when natural-break is set to false. drop-item: # The material of the dropped item. material: DIAMOND # Custom model data added to the item. # Works on 1.14+ custom-model-data: 1300 # The name that is given to the dropped item name: "&3A little diamond" # Lore applied to dropped item. lores: - ' ' - '&7A little diamond, mined by &f%player%' - ' ' exp: # false == exp is added directly to players exp bar. # true == drops it on the ground. drop-naturally: true # Amount of exp dropped. amount: 100 # Enchantments and their corresponding levels you want to add to the dropped item. # Note that these enchants are relative to your server version. The plugin will display a warning if any of the are invalid. # Valid options (latest): https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/enchantments/Enchantment.html enchants: - 'FORTUNE:2' # ItemFlags that you want added to the item. # Valid options: HIDE_ATTRIBUTES, HIDE_DESTROYS, HIDE_DYE, HIDE_ENCHANTS, HIDE_PLACED_ONE, HIDE_POTION_EFFECTS, HIDE_UNBREAKABLE # Source: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/inventory/ItemFlag.html flags: - 'HIDE_ENCHANTS' # How many should the player get? # This generates a random number between, in this case, 0 and 5 # Can be used everywhere where a number is needed. for ex. regen-delay, money, amount amount: 0-5 # Events are added in 2.0 and can do a few things already. # It can double drops on specific ores, give double exp or make ores have a chance of dropping custom equips # Not wish to use this? You can completely remove it without getting null errors # Below is an example. Read more info on the spigot updates page. event: # Event display name, the preset (block) name is used in commands. event-name: '&3Double Diamonds' # Display a boss bar for all players when the event is active. bossbar: # Text to be displayed name: "&bDiamonds, diamonds everywhere!" # Color of the boss bar # Options: BLUE, GREEN, PINK, WHITE, YELLOW, RED, PURPLE color: BLUE # Style of the boss bar # Options: SOLID, SEGMENTED_6, SEGMENTED_10, SEGMENTED_12, SEGMENTED_20 style: SOLID # Should we double the drops or exp? double-drops: true double-exp: false # You can also use rewards from the root section (console-commands(aka commands), player-commands, drop-item, etc.) commands: - 'say Hello from the event.' custom-item: amount: 1 material: LEATHER_BOOTS name: "&6Fancy shoes" lores: - "&fLook at them shoooeees" - "&e&oBling bling bling" drop-naturally: false ``` -------------------------------- ### Configure complex block regeneration rules Source: https://github.com/wertik/blockregen/wiki/Getting-started A full configuration example in Blocklist.yml defining multiple presets with specific regeneration delays and transformation targets. ```yml Blocks: diamond: target-material: diamond_ore regen-delay: 10-20 regenerate-into: gold_ore replace-block: cobblestone gold: target-material: gold_ore regen-delay: 5-10 regenerate-into: diamond_ore replace-block: cobblestone ``` -------------------------------- ### Define a block regeneration preset Source: https://github.com/wertik/blockregen/wiki/Getting-started A basic example of a preset definition in Blocklist.yml, specifying the target material, replacement block, and custom drop items. ```yml mine_diamond: target-material: DIAMOND_ORE replace-block: STONE drop-item: special_diamond: amount: 1-3 type: DIAMOND ``` -------------------------------- ### Configure ItemsAdder material and tool condition Source: https://github.com/wertik/blockregen/wiki/Compatibility-with-other-plugins Use the ia prefix to define custom block materials and tool conditions. ```yaml target-material: ia:myitems:red_block ``` ```yaml ia/tool: myitems:cool_pickaxe ``` -------------------------------- ### Configure Nexo material and tool condition Source: https://github.com/wertik/blockregen/wiki/Compatibility-with-other-plugins Use the nexo prefix to define custom block materials and tool conditions. ```yaml target-material: nexo:caveblock ``` ```yaml nexo/tool: cool_pickaxe ``` -------------------------------- ### Configure MMOItems material and tool condition Source: https://github.com/wertik/blockregen/wiki/Compatibility-with-other-plugins Use the mmoitems prefix to define custom block materials and tool conditions. ```yaml target-material: mmoitems:5 ``` ```yaml mmoitems/tool: 5 ``` -------------------------------- ### Configure Crop Farm Regeneration Source: https://github.com/wertik/blockregen/wiki/Usage-examples Set up block regeneration for crops to reset to their initial state after being harvested. ```yaml Blocks: wheat: # Specify block data to match fully grown and regenerate into seeds. target-material: wheat[age=7] regenerate-into: wheat[age=0] # Instantly replace with the regenerate-into material. regen-delay: 0 natural-break: false # Deny vanilla drops to not drop seeds. # We regenerate the crop for the players already, he won't be planting it. drop-item: material: wheat amount: 1-3 carrots: target-material: carrots[age=7] regenerate-into: carrots[age=0] regen-delay: 0 natural-break: true potatoes: target-material: potatoes[age=7] regenerate-into: potatoes[age=0] regen-delay: 0 natural-break: true ``` -------------------------------- ### Configure Required Tools Source: https://github.com/wertik/blockregen/wiki/Presets Specifies a list of materials required to break the block. ```yml tool-required: DIAMOND_PICKAXE, IRON_PICKAXE ``` -------------------------------- ### Configure ItemsAdder Drop Source: https://github.com/wertik/blockregen/wiki/Usage-examples Use console commands to drop ItemsAdder items when a specific block is broken. ```yaml Blocks: special_iron: target-material: iron_ore regen-delay: 10 replace-block: cobblestone console-commands: - "iadrop myitems:red_block %block_x% %block_y% %block_z% %block_world% 1" ``` -------------------------------- ### Configure Jobs Reborn Check Source: https://github.com/wertik/blockregen/wiki/Presets Requires specific job levels to break the block. ```yml jobs-check: Farmer;2 ``` -------------------------------- ### Configure skull textures Source: https://github.com/wertik/blockregen/wiki/Presets Use the skull property to define player head textures via username, UUID, or base64 string. ```yml regenerate-into: player_head[skull=Wertik1206] ``` ```yml regenerate-into: player_head[skull=365fbf1d-fb5b-3275-8d48-1c35666ba4f1] ``` ```yml replace-block: player_head[skull=eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvY2IyOWNmM2JmMmYyNzk1MzM4OGQ5NTYzYmY5ZTgzYmIxYWVkZmM0NzA1ZjNmYTdjNzc0OGYwYTc5NzY2Y2Q5ZSJ9fX0] ``` -------------------------------- ### Configure Oraxen material and tool condition Source: https://github.com/wertik/blockregen/wiki/Compatibility-with-other-plugins Use the oraxen prefix to define custom block materials and tool conditions. ```yaml target-material: oraxen:caveblock ``` ```yaml oraxen/tool: cool_pickaxe ``` -------------------------------- ### Configure MMOItems Drop Source: https://github.com/wertik/blockregen/wiki/Usage-examples Use console commands to drop MMOItems when a specific block is broken. ```yaml Blocks: special_iron: target-material: iron_ore regen-delay: 10 replace-block: cobblestone console-commands: - "mmoitems drop CONSUMABLE BURGER %block_world% %block_x% %block_y% %block_z%" ``` -------------------------------- ### Configure Console Commands Source: https://github.com/wertik/blockregen/wiki/Presets Defines console commands to execute upon block breakage, supporting a percentage chance. ```yml console-commands: - "50 ; say Hello!" ``` -------------------------------- ### Configure Oraxen integration Source: https://github.com/wertik/blockregen/wiki/Complete-Example Uses Oraxen custom items as target materials for regeneration. ```yaml caveblock: # oraxen: target-material: oraxen:caveblock replace-block: STONE regen-delay: 1 natural-break: false ``` -------------------------------- ### Configure Blockregen Preset in YAML Source: https://github.com/wertik/blockregen/wiki/Presets Defines a diamond ore replacement preset with specific tool requirements, custom drops, and regeneration timing. ```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: COBBLESTONE ``` -------------------------------- ### Configure block chance and custom drops Source: https://github.com/wertik/blockregen/wiki/Complete-Example Uses percentage-based chances for block replacement and regeneration, including custom item drops with metadata. ```yaml # When you mine a stone, there's a 20% chance it will regenerate back into emeralds, but 80% that it will turn to stone. # There's also a 50-50 chance it will turn into cobblestone, or bedrock. STONE: replace-block: COBBLESTONE:50;BEDROCK regenerate-into: EMERALD_ORE:20;STONE regen-delay: 3 natural-break: false # Then if you mine the emerald ore, it gives you your reward, has a 50% chance to replace with STONE of COBBLE when regenerating. # Then it turns into emerald, or stone again. EMERALD_ORE: replace-block: STONE:50;COBBLESTONE regen-delay: 2-10 regenerate-into: EMERALD_ORE:10;STONE natural-break: false regeneration-particles: block_frame drop-item: material: emerald amount: 1 name: '&aA cute emerald' lores: - '&7Mined with &d<3 &7by &f%player%' ``` -------------------------------- ### Configure Target Materials Source: https://github.com/wertik/blockregen/wiki/Presets Methods for specifying which blocks a preset targets, including single, multiple, and wildcard patterns. ```yml target-material: DIAMOND_ORE ``` ```yml target-material: COAL_ORE;IRON_ORE;GOLD_ORE ``` ```yml Blocks: DIAMOND_ORE: replace-block: STONE regen-delay: 10 natural-break: true ``` ```yml target-material: *_ORE ``` ```yml target-material: *_ORE;STONE;COBBLESTONE ``` -------------------------------- ### Define region-specific block behavior Source: https://github.com/wertik/blockregen/wiki/Usage-examples Define multiple presets targeting the same material to apply different regeneration settings based on the region. ```yaml Blocks: diamond_1: target-material: DIAMOND_ORE regen-delay: 10 replace-block: BEDROCK drop-item: type: diamond amount: 1 name: "&3Diamond from mine 1" diamond_2: target-material: DIAMOND_ORE regen-delay: 20-30 replace-block: cobblestone drop-item: type: diamond amount: 1-3 name: "&9Diamond from mine 2" ``` -------------------------------- ### Configure Player Commands Source: https://github.com/wertik/blockregen/wiki/Presets Defines player commands to execute upon block breakage, supporting a percentage chance. ```yml player-commands: - "50 ; me Hello!" ``` -------------------------------- ### Configure block breaking conditions Source: https://github.com/wertik/blockregen/wiki/Presets Sets requirements for breaking a block, such as specific tools or placeholder values. ```yaml 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" ``` ```yaml mine_diamond: target-material: diamond_ore regen-delay: 3 conditions: tool: material: diamond_pickaxe placeholder: "%player_y% < 100" ``` -------------------------------- ### Configure Experience Drops Source: https://github.com/wertik/blockregen/wiki/Presets Defines experience drop behavior including natural dropping and amount ranges. ```yml exp: drop-naturally: true amount: 10-100 ``` -------------------------------- ### Configure Hypixel-style mines in Blocklist.yml Source: https://github.com/wertik/blockregen/wiki/Usage-examples Defines block regeneration sequences including target materials, replacement blocks, and regeneration delays. ```yaml Blocks: coal: target-material: coal_ore regenerate-into: stone regen-delay: 0 natural-break: true stone: target-material: stone regenerate-into: cobblestone regen-delay: 0 natural-break: true cobblestone: target-material: cobblestone replace-block: bedrock # Set a low chance of coal respawning to prevent players abusing the same location. regenerate-into: coal_ore:5;stone regen-delay: 10 natural-break: true ``` -------------------------------- ### Configure break sound Source: https://github.com/wertik/blockregen/wiki/Presets Defines the sound played when the block is broken. ```yaml sound: AMBIENT_UNDERWATER_ENTER ``` -------------------------------- ### Configure block chaining Source: https://github.com/wertik/blockregen/wiki/Complete-Example Defines a sequence where blocks regenerate into different materials over specified delays. ```yaml # Coal regenerates into Iron, Iron into Gold, Gold back to Coal. COAL_ORE: replace-block: STONE regenerate-into: IRON_ORE regen-delay: 3 drop-naturally: true IRON_ORE: replace-block: STONE regenerate-into: GOLD_ORE regen-delay: 5 drop-naturally: true GOLD_ORE: replace-block: STONE regenerate-into: COAL_ORE regen-delay: 10 drop-naturally: true ``` -------------------------------- ### Configure Replacement Block Source: https://github.com/wertik/blockregen/wiki/Presets Sets the material used to replace the broken block during regeneration. ```yml replace-block: STONE ``` -------------------------------- ### External Plugin Conditions Source: https://github.com/wertik/blockregen/wiki/Presets Integrates conditions provided by other supported plugins. ```yml conditions: ia/tool: myitems:cool_pickaxe ``` -------------------------------- ### Configure custom drops Source: https://github.com/wertik/blockregen/wiki/Presets Defines items to drop when a block is broken, supporting custom names, amounts, and lore. ```yaml drop-item: material: DIAMOND name: "&3Special diamond" amount: 1-3 lores: - "" - "&7Mined by &a%player%" - "" ``` ```yaml drop-item: diamond: material: DIAMOND name: "&3Special diamond" amount: 1-3 lores: - "" - "&7Mined by &a%player%" - "" stone: material: STONE ``` -------------------------------- ### Restrict block breaking with WorldGuard Source: https://github.com/wertik/blockregen/wiki/Usage-examples Enable the Disable-Other-Break setting in Settings.yml to prevent players from breaking blocks not managed by BlockRegen within a WorldGuard region. ```yaml Disable-Other-Break: true ``` -------------------------------- ### Set Custom Item Name Source: https://github.com/wertik/blockregen/wiki/Presets Defines a custom display name for the item using color codes. ```yml name: "§x§d§6§6§e§0§1Sand" ``` -------------------------------- ### Configure Regeneration Delay Source: https://github.com/wertik/blockregen/wiki/Presets Sets the time in seconds before a block regenerates. Use 0 for immediate regeneration or -1 to disable automatic regeneration. ```yml regen-delay: 10 ``` -------------------------------- ### Configure External Plugin Drops Source: https://github.com/wertik/blockregen/wiki/Presets Defines drops sourced from other plugins using specific identifiers. ```yml item: ia:myitems:red_block amount: 2 chance: 25 drop-naturally: true ``` -------------------------------- ### Drop External Item Source: https://github.com/wertik/blockregen/wiki/Presets Configures a drop using an external plugin item definition. ```yml drop-item: item: ia:myitems:red_block ``` -------------------------------- ### Set Item Lore Source: https://github.com/wertik/blockregen/wiki/Presets Defines a list of lore lines for the item. ```yml lores: - "§x§d§6§6§e§0§1Sand" ``` -------------------------------- ### Set Item Model Path Source: https://github.com/wertik/blockregen/wiki/Presets Specifies the path to a custom model within the resource pack for versions 1.21.2+. ```yml item-model: "/assets/minecraft/items/iron_ingot" ``` -------------------------------- ### Set dynamic regeneration delay Source: https://github.com/wertik/blockregen/wiki/Presets Define a range for random regeneration timing. ```yml regen-delay: 10-30 ``` -------------------------------- ### Configure regeneration particles Source: https://github.com/wertik/blockregen/wiki/Presets Sets the particle effect displayed upon block regeneration. ```yaml regeneration-particles: flame_crown ``` -------------------------------- ### Explicit Logical Grouping Source: https://github.com/wertik/blockregen/wiki/Presets Uses 'any' or 'all' sections to explicitly define the relationship between multiple conditions. ```yml conditions: any: - tool: material: DIAMOND_PICKAXE - placeholder: "%player_y% < 100" ``` ```yml conditions: placeholder: all: - "%player_y% > 100" - "%block_y% < 100" ``` -------------------------------- ### Configure Required Enchants Source: https://github.com/wertik/blockregen/wiki/Presets Specifies required enchantments and levels for the tool used to break the block. ```yml enchants-required: FORTUNE;2, MENDING ``` -------------------------------- ### Define block node data Source: https://github.com/wertik/blockregen/wiki/Presets Specify extra properties for blocks using square brackets after the material name. ```yml regenerate-into: wheat[age=3] ``` -------------------------------- ### Apply Enchantments Source: https://github.com/wertik/blockregen/wiki/Presets Adds enchantments to the item with specified levels. ```yml enchants: - FORTUNE:2 - UNBREAKING:2 ``` -------------------------------- ### Configure Break Particles Source: https://github.com/wertik/blockregen/wiki/Presets Sets the particle effect displayed when the block is broken. ```yml particles: flame_crown ``` -------------------------------- ### Configure Drop Chance Source: https://github.com/wertik/blockregen/wiki/Presets Sets the percentage chance for an item to be dropped. ```yml chance: 10.2 ``` -------------------------------- ### Apply Conditions to Drops Source: https://github.com/wertik/blockregen/wiki/Presets Restricts drops based on specific criteria, such as the tool used by the player. ```yml diamond: material: diamond amount: 1-3 conditions: tool: material: diamond_pickaxe ``` -------------------------------- ### Define dynamic materials Source: https://github.com/wertik/blockregen/wiki/Presets Specify multiple materials for regeneration, optionally with percentage-based probabilities. ```yml regenerate-into: DIAMOND_ORE;GOLD_ORE ``` ```yml regenerate-into: DIAMOND_ORE:32.5;GOLD_ORE:20;IRON_ORE ``` -------------------------------- ### Tool Enchantment Conditions Source: https://github.com/wertik/blockregen/wiki/Presets Checks for specific enchantment levels on the player's tool. ```yml tool: material: DIAMOND_PICKAXE enchants: - FORTUNE > 2 - EFFICIENCY > 2 ``` -------------------------------- ### Define advanced regeneration conditions Source: https://github.com/wertik/blockregen/wiki/Complete-Example Restricts regeneration based on specific tools or placeholder API conditions. ```yaml conditioned: target-material: diamond_ore regen-delay: 10 conditions: tool: material: NETHER_PICKAXE placeholder: "%player_y% < 100" ``` -------------------------------- ### Apply Item Flags Source: https://github.com/wertik/blockregen/wiki/Presets Sets item flags to modify display behavior, such as hiding enchantments. ```yml flags: - HIDE_ENCHANTS ``` -------------------------------- ### Define block rarity Source: https://github.com/wertik/blockregen/wiki/Complete-Example Sets the probability of an item drop or event occurring. ```yaml # How rare it is to get the item. In this case a 1 in 50 chance of getting it. # Can't use a random (low & high) number here. rarity: 50 ``` -------------------------------- ### Regenerate Block into External Item Source: https://github.com/wertik/blockregen/wiki/Presets Configures a block to regenerate into an external plugin item. ```yml regenerate-into: oraxen:caveblock ``` -------------------------------- ### Conjunctive Conditions Source: https://github.com/wertik/blockregen/wiki/Presets Defines conditions where all specified criteria must be met simultaneously. ```yml conditions: tool: material: DIAMOND_PICKAXE placeholder: "%player_y% < 100" ``` -------------------------------- ### Negated Conditions Source: https://github.com/wertik/blockregen/wiki/Presets Inverts the logic of a condition section by prepending a caret symbol. ```yml conditions: ^tool: material: DIAMOND_PICKAXE ``` -------------------------------- ### Disjunctive Conditions Source: https://github.com/wertik/blockregen/wiki/Presets Defines conditions where at least one of the listed criteria must be met. ```yml conditions: tool: material: - DIAMOND_PICKAXE - GOLDEN_PICKAXE ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.