Furnace NBT Recipes — Minecraft Mods — MetaMods

Furnace NBT Recipes

Active

Downloads

0

Last update

9 months ago

Versions

1.21.2 — 1.21.4
Server
Libraries

Furnace NBT Recipes

🔥 Powerful datapack library for Minecraft with advanced NBT data and component support for creating custom smelting recipes!

Provides tools for developing complex smelting recipes that account for item NBT tags and components. 🛠️

🎯Usage Features

🛠️ Recipe Definition

The library offers the following function tags for adding custom recipes:

  • #furnace_nbt_recipes:v1/smelting_recipes – Regular smelting in standard furnace ️🔥
  • #furnace_nbt_recipes:v1/blasting_recipes – Fast processing in blast furnace ⚒️
  • #furnace_nbt_recipes:v1/smoking_recipes – Food preparation in smoker 🍖

Each of these tags requires adding a function call that will check input items and trigger the corresponding recipe.

Example implementation of smelting with NBT data verification:

# Smelt 'raw simplunium' into 'simplunium ingot'
execute if score #found furnace_nbt_recipes.data matches 0 store result score #found furnace_nbt_recipes.data if data storage furnace_nbt_recipes:main input{"components": {"minecraft:custom_data": {"simplenergy": {"raw_simplunium": true}}}} run loot replace block ~ ~ ~ container.3 loot simplenergy:i/simplunium_ingot

🔧 Disabling Vanilla Recipes

For proper operation of custom recipes, it's necessary to block standard Minecraft item processing. Example of banning specific vanilla item:

# Ban recipes for 'command block' item:
execute if score #reset furnace_nbt_recipes.data matches 0 store success score #reset furnace_nbt_recipes.data if data storage furnace_nbt_recipes:main input{"id":"minecraft:command_block"}

⭐ Experience Rewards

Configure a reward system for players using your recipes. Implementation of experience system when retrieving items from furnace:

# Grant 0.8 experience for smelting 'raw simplunium'
execute if score #found furnace_nbt_recipes.data matches 0 store result score #found furnace_nbt_recipes.data if data storage furnace_nbt_recipes:main input{"components": {"minecraft:custom_data": {"simplenergy": {"raw_simplunium": true}}}} run function simplenergy:calls/furnace_nbt_recipes/xp_reward/0.8

📋 Additional Recommendations

Each custom recipe requires creating a basic recipe where source and result items match the recipe's base elements.

Project members
Stoupy51

Stoupy51

Developer

Created: 27 Nov 2024

ID: 66303