Download Push To Craft — Minecraft Mods — MetaMods

Push To Craft

Active

Downloads

0

Last update

2 years ago

Versions

1.15 — 1.19.2
Server
Fabric
Libraries
Control

Push To Craft

How to Use

The modification introduces a new data type called push_to_craft. Place the files in a push_to_craft folder within your datapack or the mod's data directory (alongside the recipes or tags directories).

JSON File Structure

A valid JSON file has the following structure:

  • additions: Array - Defines all items or tags you want to add to target elements
    • Entries are item identifiers as strings. To use tags, add the # prefix.
  • targets: Array or String - Defines which items and tags to apply changes to in recipes
    • Entries are item identifiers or tags as strings.
  • recipes: Object - Sets conditions for selecting recipes
    • types: Array - optional - Defines which recipe types to use
      • Entries are recipe serializer identifiers as strings
    • ids: Array - optional - Defines which specific recipes to modify
      • Entries are strings of the following types:
        • Exact recipe identifiers, e.g. minecraft:anvil
        • Namespace-specific regular expressions where only the last part of the identifier is regex, e.g. minecraft:.
        • Complete regular expressions starting and ending with a forward slash, e.g. /.craft:./

Usage Examples

This example allows using blackstone instead of cobblestone everywhere:

{
    "additions": [
        "minecraft:blackstone"
    ],
    "targets": [
        "minecraft:cobblestone"
    ],
    "recipes": {}
}

This example allows using emeralds and all types of planks as alternatives to diamonds and iron ore in crafting and smelting recipes:

{
    "additions": [
        "minecraft:emerald",
        "#minecraft:planks"
    ],
    "targets": [
        "minecraft:diamond",
        "minecraft:iron_ore"
    ],
    "recipes": {
        "types": [
            "crafting_shaped",
            "crafting_shapeless",
            "blasting"
        ],
        "ids": [
            "minecraft:/./"
        ]
    }
}

For Mod Developers

If you're a mod developer and want to use this functionality in your projects, you can connect the library via maven:

repositories {
    maven {
        name "Siphalor's Maven"
        url "https://maven.siphalor.de"
    }
}

dependencies {
    modCompile "de.siphalor:pushtocraft-1.15:+"
    // Optionally you can include this mod in your jar file
    include "de.siphalor:pushtocraft-1.15:+"
}
Project members
Siphalor

Siphalor

Developer

Created: 9 Oct 2022

ID: 12448