Block Interaction - benbenlaw/InWorldRecipes GitHub Wiki

This is a more advanced version of the rightclickonblocktransformitems/block recipes it is encouraged to use this version going forward

"click_type": uses "right" or "left" to choose what interaction you want

"target_block_state" is the block state of the block a simple block like stone would look like this;

  "target_block_state": {
    "Name": "minecraft:stone"
  }

"held_item" is a sized ingredient meaning you can use a tag or item stack

"output_block_state" is the block that will replace the target block in world, this is optional leaving is empty will not remove the block, setting this to air will destory the block with no drops

"results" these are chance based results as shown below

"damage_held_item": boolean if item is damaged

"consume_held_item": boolean if item is consumed

"pop_items": boolean if true result drops in world if false go into player invenotry

More advanced block states can be found below Example;

{
  "type": "inworldrecipes:block_interaction",
  "click_type": "right",
  "target_block_state": {
    "Name": "minecraft:wheat",
    "Properties": {
      "age": "7"
    }
  },
  "held_item": {
    "item": "minecraft:diamond_sword"
  },
  "output_block_state": {
    "Name": "minecraft:wheat",
    "Properties": {
      "age": "3"
    }
  },
  "results": [
    {
      "item": {
        "count": 2,
        "id": "minecraft:acacia_log"
      }
    },
    {
      "chance": 0.2,
      "item": {
        "count": 2,
        "id": "minecraft:diamond"
      }
    }
  ],
  "damage_held_item": true,
  "consume_held_item": false,
  "pop_items": false
}