PortalTransform

PortalTransform

Mod

Added a new portal recipe.

Client and server AdventureGame MechanicsMagic

267 downloads
9 followers
Follow Save
90% of ad revenue goes to creators. Go ad-free while supporting creators with Modrinth Plus. Subscribe today!

PortalTransform Recipe

Example GUI

Portal Transmutation - When players hurl items into portals, they undergo elemental conversion with possible byproducts. Full datapack extensibility! Design custom transmutation chains through JSON configurations.

This JSON file should be placed in the following directory: /data/portaltransform/recipe/

{
        "type": "portaltransform:portal_transform",
        "input": {
            "item": "minecraft:diamond",
        },
        "result": {
            "id": "minecraft:emerald"
        },
        // Optional: Dimension constraints
        // "current_dimension": "minecraft:overworld",
        // "target_dimension": "minecraft:the_nether",
        "byproducts": [
            {
                "byproduct": { "id": "minecraft:lapis_lazuli" },
                "chance": 0.9,
                "counts": {
                    "min": 1,
                    "max": 3
                }
            }
        ]
    }

ServerEvents.recipes((event) => {
    event.recipes.portaltransform.item_transform(
        "minecraft:cobblestone",
        "minecraft:prismarine",
        [
                 Byproduct.of("minecraft:redstone", 0.8, 1, 4)
        ],
        {
            current: "minecraft:overworld",
            target: "minecraft:the_nether"
        },
        "any", // It can be "any", "clear", "rain", "thunder"
        0.1
    );
})

If you find errors according to the code on this page, you may need to check here.


Project members

QiHuang02

Member

Details

Licensed MIT
Published 3 months ago
Updated 6 days ago