Download Genflower — Minecraft Mods — MetaMods

Genflower

Active

Downloads

0

Last update

1 year ago

Versions

1.20 — 1.20.1
Server
Fabric
Forge
Neoforge
Quilt
Libraries
Utils

Genflower: Enhanced World Generation and Loot Library

Genflower is a compact utility library designed to simplify the creation of datapacks and modifications. It introduces new structure processing tools and loot customization features that help accomplish tasks previously impossible or time-consuming using Minecraft's standard tools.

Loot Management Functions

Potion Randomizer: genflower:set_random_potion

This function enables random potion assignments when spawning in brewing stands and chests, making discoveries more diverse and engaging.

Configuration parameters:

  • potions: List of potions with their appearance probability in two formats:
    • Direct ID to weight mapping: {"minecraft:luck": 1}
    • Objects in array: [{"data":"minecraft:luck","weight":1}]

In the objects-in-array format, the weight parameter is optional - it defaults to 1.

Usage example:

// data/useyourname/loot_tables/chests/your_loot.json -> /pools[]
{
    "entries": [
        {
            "type": "minecraft:item",
            "functions": [
                {
                    "function": "genflower:set_random_potion",
                    "potions": {
                        "minecraft:long_invisibility": 1,
                        "minecraft:invisibility": 5
                    }
                }
            ],
            "name": "minecraft:potion"
        },
        {
            "type": "minecraft:item",
            "functions": [
                {
                    "function": "genflower:set_random_potion",
                    "potions": [
                        {
                            "data": "minecraft:long_invisibility",
                            "weight": 1
                        },
                        {
                            "data": "minecraft:invisibility",
                            "weight": 5
                        }
                    ]
                }
            ],
            "name": "minecraft:splash_potion"
        }
    ]
}

World Generation Structure Processors

Block Replacement: genflower:block_map

Enables block replacement in structures using simple mapping rules, reducing code complexity for intricate transformations.

Configuration settings:

  • block_map: Mapping between source blocks and replacement block lists
  • probability: Replacement likelihood (0-1 scale, defaults to 1)

Configuration example:

// data/useyourname/worldgen/processor_list/your_processor.json
{
    "processors": [
        {
            "processor_type": "genflower:block_map",
            "block_map": {
                "minecraft:cobweb": ["minecraft:air"],
                "supplementaries:ash": ["minecraft:air"]
            }
        },
        {
            "processor_type": "genflower:block_map",
            "block_map": {
                "minecraft:deepslate_bricks": [
                    "minecraft:cobbled_deepslate",
                    "minecraft:deepslate_brick_stairs",
                    "minecraft:deepslate_brick_slab"
                ],
                "minecraft:lantern": ["wilderwild:display_lantern"],
                "minecraft:deepslate_brick_stairs": [
                    "minecraft:deepslate_brick_slab"
                ],
                "minecraft:mangrove_stairs": [
                    "minecraft:mangrove_slab",
                    "minecraft:cobweb"
                ],
                "minecraft:anvil": [
                    "minecraft:chipped_anvil",
                    "minecraft:damaged_anvil"
                ]
            },
            "probability": 0.25
        }
    ]
}

Container Block Loot Population: genflower:loot

Adds loot to container blocks that don't support the standard LootTable tag system.

Available parameters:

  • loot_table: Loot table to assign
  • blocks: List of target blocks for loot allocation
  • slots: Number of slots in the block
  • probability: Loot application chance (0-1 scale, defaults to 1)

Configuration example:

// data/useyourname/worldgen/processor_list/your_processor.json
{
    "processors": [
        {
            "processor_type": "genflower:loot",
            "loot_table": "useyourname:chests/library_bookshelves",
            "blocks": ["minecraft:chiseled_bookshelf"],
            "slots": 6,
            "probability": 0.8
        },
        {
            "processor_type": "genflower:loot",
            "loot_table": "useyourname:chests/library_brewing_stands",
            "blocks": ["minecraft:brewing_stand"],
            "slots": 3
        }
    ]
}

Genflower provides developers with straightforward yet powerful tools for creating unique gameplay content, simplifying previously complex tasks and opening new possibilities for Minecraft world customization.

Project members
Ampflower

Ampflower

Developer

Created: 19 Jan 2024

ID: 21128