
Scrap
This mod is specifically designed for modpack creators, allowing them to add scrap items that transform into treasure using Minecraft's LootTable system.
Scrap can be found anywhere: among the ruins of ancient cities, in the dark depths of underground dungeons, or even after defeating hostile creatures. Each find can yield valuable loot or prove to be worthless junk - it all depends on your configuration.
Loot Configuration
Scrap utilizes the LootTable system for item generation. You can configure the mod to work with any existing loot tables: chest contents, mob drops, or even fishing catches. All of them are compatible with this mod.
Before creating your own loot tables, it's recommended to study the relevant LootTable documentation for Minecraft.
S:loot_tables <
Dungeon@minecraft:chests/simple_dungeon@3d4@#ab948b@#269463
>
Each entry consists of two main components: — The name of the scrap pile (e.g., "Dungeon") — The path to the loot table (e.g., "minecraft:chests/simple_dungeon")
Additionally, you can specify experience amount (in dice format), colors for the icon (in HEX format) - for the gear and plate. If only one color is specified, it will be used for both elements.
Custom Loot Tables
You can add custom JSON files with loot tables to the Config\Scrap folder of your Minecraft instance. Such tables will be accessible via "scrap:filename" path.
S:loot_tables <
Parts@scrap:scrap@3d4
City Chest@scrap:chest@ab948b@269463
>
This entry will create two scrap piles: the first uses the scrap.json file and gives 3-12 experience, the second uses chest.json with customized colors without experience.
NBT and Scripting
The characteristics of scrap piles are determined by their NBT data, allowing you to create unique instances through CraftTweaker or InControl. Five parameters are used: — NAME — name — TABLE — loot table — GEAR — gear color — PLATE — plate color — XP — experience amount
Example command for adding scrap with loot from cows, red gear, green plate, and 2-16 experience:
/give @a scrap:scrap 1 0 {NAME:"Cow",TABLE:"minecraft:entities/cow",GEAR:"FF0000",PLATE:"00FF00",XP:"2d8"}
Additional Settings
B:easyXP=true
B:enableBrokenGears=false
B:enableBrokenPlates=false
B:rightclick_stack=false
The enableBrokenGears and enableBrokenPlates options add chipped gears and dented plates compatible with Thermal Foundation (they also generate when the mod is disabled), but without recipes or basic uses. They are primarily intended for integration with other systems like CraftTweaker.
rightclick_stack allows you to open an entire stack of scrap at once when clicking while sneaking. Be aware that excess items will drop on the floor near the player.
easyXP determines whether experience is awarded directly to the player or spawns as experience orbs.