Skip to content

Customizing Resonance Drops

DaFuqs edited this page Aug 12, 2023 · 12 revisions

Resonance is an enchantment valid for mining tools, which unlocks in the late game tree. When destroying a block with a resonance enchanted tool, all drops of one item type will be converted to a whole other item type.

You can specify additional resonance drops, or edit existing ones, by placing json files in the directory <data_pack_or_mod_name>/resonance_drops/.

Variant 1: Configuratble Silk Touch

Setting the flag drop_self to true makes Resonance act as Silk Touch for block. You can also specify to copy block entity or block state data.

Properties

  • (Block or Block Tag) block: The block / block tag that this entry triggers on
  • (Boolean) drop_self: Makes the Block drop as-is (like Silk Touch does)
  • (String[]) nbt_to_copy: Block Entity NBT to preserve
  • (String[]) state_properties_to_copy: Block State Properties to preserve
  • (Boolean) include_default_state_tags: Normally, state properties that are the default will be omitted to make items stack. By setting this flag to true, those will be copied regardless

Example: Making Blocks drop themselves

{
  "block": "spectrum:black_materia",
  "drop_self": true
}
{
  "block": "#c:buds",
  "drop_self": true
}

Example 2: Preserving Block State Properties

When a Sculk Shrieker is broken, retain the ability to summon the Warden.

{
  "block": "minecraft:sculk_shrieker",
  "drop_self": true,
  "state_tags_to_copy": [
    "can_summon"
  ]
}

Example 3: Preserving Block Entity Data

When a block in the minecraft:signs tag is broken with Resonance, various kinds of block entity data is preserved.

{
  "block": "#minecraft:signs",
  "drop_self": true,
  "nbt_to_copy": [
    "GlowingText",
    "Color",
    "Text1",
    "Text2",
    "Text3",
    "Text4"
  ]
}

Variant 2: Modifying Block Drops

Properties

  • (Block or Block Tag) block: The block / block tag that this entry triggers on
  • (List) modify_drops:
    • (Ingredient) input: The ingredient that will get matched and switched do output
    • (Identifier) output: The item that will be dropped instead

Example

{
  "block": "#c:ores",
  "modify_drops": [
    {
      "input": {
        "item": "minecraft:coal"
      },
      "output": "spectrum:pure_coal"
    },
    {
      "input": {
        "tag": "c:raw_copper"
      },
      "output": "spectrum:pure_copper"
    }
  ]
}
Clone this wiki locally