Download Item Scrapper — Minecraft Mods — ModStock
Item Scrapper

Item Scrapper

Active

Downloads

0

Last update

1 month ago
Client
Technological

The Item Scrapper mod introduces a specialized crafting station for scrapping items. With this mod, players gain access to a robust system that allows dismantling items into their core components in a configurable and immersive way.


EXAMPLE CONFIGS: Click Here


Short showcase clip from Enderverses top 20 mods video (original video link)

Key Features

  1. Item Scrapping Workbench:
    A unique crafting station where players can scrap items for resources.

  2. JSON Configurability:
    Easily customize the items that can be scrapped and their resulting outputs via JSON files that are placed in recipes and transforms folders:

    • transforms jsons: Defines positional transformations for items based on their IDs or NBT data.
    • recipie jsons: Configures scrapping mechanics, loot outcomes, and optional effects such as explosions (via explosionChance and explosionPower).
  3. Versatile Use:
    The scrapping workbench can process any item specified in the configuration, allowing compatibility with various mods.



Example dir structure:

.
└── config/
    └── item_scrapper/
        └── data/
            ├── recipes/
            │   ├── forge_armors_iron/
            │   │   ├── iron_helmet_result.json
            │   │   ├── iron_chestplate_result.json
            │   │   ├── iron_leggings_result.json
            │   │   └── iron_boots_result.json
            │   │
            │   ├── forge_armors_diamond/
            │   │   ├── diamond_helmet_result.json
            │   │   ├── diamond_chestplate_result.json
            │   │   ├── diamond_leggings_result.json
            │   │   └── diamond_boots_result.json
            │   │
            │   └── forge_iron_tools/
            │       ├── iron_sword_result.json
            │       ├── iron_hoe_result.json
            │       └── iron_boots_result.json
            │
            └── transforms/
                ├── forge_armors_iron/
                │   ├── iron_helmet_transform.json
                │   ├── iron_chestplate_transform.json
                │   ├── iron_leggings_transform.json
                │   └── iron_boots_transform.json
                │   
                ├── forge_armors_diamond/
                │   ├── diamond_helmet_transform.json
                │   ├── diamond_chestplate_transform.json
                │   ├── diamond_leggings_transform.json
                │   └── diamond_boots_transform.json
                │
                └── forge_iron_tools/
                    ├── iron_sword_transform.json
                    ├── iron_hoe_transform.json
                    └── iron_boots_transform.json


Explenation of all fields


Transform Fields

  • xLocation: Set the position of the item on the scrapping table along the X-axis.
  • yLocation: Set the position of the item on the scrapping table along the Y-axis.
  • zLocation: Set the position of the item on the scrapping table along the Z-axis.
  • layingRotation: Controls the rotation of the item when placed on the table. Affecting rotation on the X-axis.
  • requiredNbt: The NBT tag needed for the item to be valid. For example, {GunId:"tacz:glock_17"}.

Recipe Fields

  • explosionPower: The strength of the explosion if triggered.
  • requiredHits: The number of hits required to scrap the item.
  • explosionChance: The chance of an explosion occurring.
  • useDurabilityMultiplier: Determines if durability affects the loot drop. Set to true if durability should reduce the loot amount when the item has low durability.
  • roundingType: Defines how the loot is rounded:
    • STANDARD: Rounds to 0 if below 0.5, rounds to 1 if above.
    • FLOOR: Rounds anything below 1 to 0.
    • CEILING: Rounds anything below 1 to 1.

Recipe Fields Inside "lootable"

  • amountForMaxReturn: The amount of loot required to get the full return from the recipe. For example, if this is set to 2 and you have 1 item, it will give half the loot.
  • autoGenerateFromRecipe: Whether to automatically generate loot from the recipe. This is recommended (true) as most features use this option.
  • recipeId: The ID of the recipe, for example, "minecraft:diamond_pickaxe".
  • returnAmount: Defines the min and max percentage of loot dropped from the recipe:
    • min: Minimum percentage of loot.
    • max: Maximum percentage of loot.

Lootable Path Example

If you'd prefer to use a specific loot table, here’s how you can set it up:

  • lootable: The path to the loot table:
    • For example: "minecraft:chests/end_city_treasure".
  • autoGenerateFromRecipe: Whether to generate loot from the recipe. It's recommended to set this to true (false is an option, but auto-generation is commonly used).

Examples with explenation


Transform Example 1

This example shows a diamond pickaxe placed on the scrapping table with no offsets or rotation. The xLocation, yLocation, and zLocation are all set to 0, and the layingRotation is also set to 0 (no rotation).

JSON
{
  "minecraft:diamond_pickaxe": [
    {
      "xLocation": 0.0,
      "zLocation": 0.0,
      "layingRotation": 0.0,
      "yLocation": 0.0
    }
  ]
}
Explanation:
 
  • The xLocation, yLocation, and zLocation determine where the item is placed on the scrapping table. In this case, the item is placed directly at the origin (0,0,0).
  • layingRotation specifies the rotation of the item. Here, it's set to 0, meaning no rotation is applied.

Transform Example 2

This example shows a modern_kinetic_gun placed with specific offsets and a requiredNbt tag for the Glock 17 from the TACZ mod. The layingRotation is set to 90 degrees.

JSON
{
  "tacz:modern_kinetic_gun": [
    {
      "xLocation": 0.0,
      "yLocation": 0.0,
      "zLocation": -0.2,
      "layingRotation": 90.0,
      "requiredNbt": "{GunId:\"tacz:glock_17\"}"
    }
  ]
}
Explanation:
  • xLocation, yLocation, and zLocation are set to place the item slightly offset from the center. Here, it is shifted by -0.2 along the Z-axis.
  • layingRotation rotates the item 90 degrees, which is useful for changing the orientation.
  • requiredNbt specifies that this item is only valid if the NBT data for the item matches the provided GunId ("tacz:glock_17"). In this case, only a Glock 17 from the TACZ mod can be placed.

Recipe Example 1

This example defines a diamond pickaxe recipe with various parameters for explosion power, required hits, explosion chance, and loot generation. It also uses a durability multiplier to influence the amount of loot.

JSON
{
  "minecraft:diamond_pickaxe": [
    {
      "explosionPower": 0.0,
      "requiredHits": 4.0,
      "explosionChance": 0.0,
      "useDurabilityMultiplier": true,
      "roundingType": "STANDARD",
      "lootable": {
        "amountForMaxReturn": 1,
        "autoGenerateFromRecipe": true,
        "recipeId": "minecraft:diamond_pickaxe",
        "returnAmount": {
          "min": 25.0,
          "max": 35.0
        }
      }
    }
  ]
}
Explanation:
  • explosionPower defines how powerful the explosion will be when triggered. In this case, it’s set to 0.0, meaning no explosion.
  • requiredHits specifies that the item needs to be hit 4 times before it can be scrapped.
  • explosionChance sets the chance of an explosion happening during the scrapping process. It’s set to 0.0, so no explosion will occur.
  • useDurabilityMultiplier is set to true, which means the durability of the item will influence the loot drop. If the item has low durability, the loot will be reduced.
  • roundingType determines how loot amounts are rounded. "STANDARD" rounds values less than 0.5 to 0, and values above 0.5 to 1.
  • lootable defines how loot is generated from the recipe. The amount of loot is scaled using the amountForMaxReturn and returnAmount.

Recipe Example 2

This example shows a diamond pickaxe recipe that uses a custom loot table and has different explosion properties and hit requirements.

JSON
{
  "minecraft:diamond_pickaxe": [
    {
      "lootable": {
        "lootTable": "minecraft:blocks/diamond_ore",
        "autoGenerateFromRecipe": false
      },
      "requiredHits": 5,
      "explosionChance": 0.1,
      "explosionPower": 1.0
    }
  ]
}
Explanation:
  • lootable now references a custom loot table for diamond_ore, meaning that the loot generated from this item will be taken from that loot table.
  • autoGenerateFromRecipe is set to false, meaning loot won't automatically be generated from the recipe.
  • requiredHits is now 5, meaning it will take 5 hits before scrapping can happen.
  • explosionChance is set to 0.1 (10% chance for an explosion), and explosionPower is 1.0, creating a mild explosion when triggered.

Recipe Example 3

This example defines a modern_kinetic_gun recipe with a lot of additional properties such as auto-generating loot, explosion chances, and required hits. It also includes the requiredNbt for the Glock 17.

JSON
{
  "tacz:modern_kinetic_gun": [
    {
      "lootable": {
        "autoGenerateFromRecipe": true,
        "recipeId": "tacz:glock_17",
        "amountForMaxReturn": 1,
        "returnAmount": {
          "min": 45,
          "max": 70
        }
      },
      "roundingType": "STANDARD",
      "requiredHits": 1.6,
      "explosionChance": 5,
      "explosionPower": 2,
      "requiredNbt": "{GunId:\"tacz:glock_17\"}"
    }
  ]
}
Explanation:
  • lootable defines that loot should be auto-generated from the recipe, and it uses the Glock 17 recipe ID.
  • amountForMaxReturn is set to 1, meaning that you’ll need 1 item to get the full return.
  • returnAmount defines that loot will drop between 45% and 70% of the potential loot.
  • roundingType is set to "STANDARD", so loot values will be rounded accordingly.
  • requiredHits is 1.6, meaning a fraction of a hit is needed before scrapping (for more detailed setups).
  • explosionChance is set to 5, which indicates a 5% chance of triggering an explosion when scrapping.
  • explosionPower is set to 2, causing a stronger explosion when triggered.
  • requiredNbt makes sure that only a Glock 17 can trigger this recipe.

                             

Special thanks to Corrineduck, Plazuk, Raph and MC7

This mod was originaly made for the modpack CW but anyone can ofc use it.


 

Project members
Keerdm

Keerdm