Repository navigation
Jewelry Datapacks
From 2.0.0 (NeoForge 1.21.1). For modpack makers and datapack authors who want new jewelry: a material, a gem, a style or a named piece. Everything here is JSON in a datapack, with optional art in a resource pack. No code, no new items.
Server config, loot modifiers, Curios slots and tags are on Modpacks and Datapacks.
Every ring, necklace and bracelet is one of three items: magictreasures:ring, magictreasures:necklace and
magictreasures:bracelet. What a piece is sits on the item: its material, its gem, its style, and the named piece
(preset) it comes from, if any. Its stats are worked out from those every time they're needed, so changing a
material's JSON changes every piece made of it, including ones already in chests and inventories.
A datapack fills five lists, one folder each under data/<namespace>/magictreasures/:
| Folder | What an entry is | Built-in examples |
|---|---|---|
jewelry_material/ |
What the piece is made of | wood, iron, copper, silver, gold, bone (and blood, shadow, atium for named pieces) |
stone_tier/ |
What a gem adds |
tier1 … tier6
|
gemstone/ |
An item that can be set as a gem | topaz, onyx, diamond, jadeite, ruby, white pearl, sapphire, black pearl (and Treasure2's, when installed) |
jewelry_style/ |
A variant that scales the stats and has its own art | regular, great, lords |
jewelry_preset/ |
A named piece | Angel's Ring, the hawk and castle rings, the set pieces |
The entry's id is its namespace and file name: data/mypack/magictreasures/jewelry_material/titanium.json is
mypack:titanium.
This pack adds titanium, an amber gem (honeycomb), a new ring style and one named piece. Its files:
mypack/
pack.mcmeta
data/mypack/magictreasures/
jewelry_material/titanium.json
stone_tier/amber.json
gemstone/amber.json
jewelry_style/ornate.json
jewelry_preset/ambersmiths_band.json
data/magictreasures/tags/magictreasures/jewelry_material/metals.json
pack.mcmeta for 1.21.1:
{ "pack": { "pack_format": 48, "description": "Titanium and amber jewelry" } }{
"ingredient": { "tag": "c:ingots/titanium" },
"rarity": "rare",
"color": "#B8C2CC",
"uses": 300,
"mana": 120,
"repairs": 3,
"max_level": 8,
"factors": { "cost": 0.95, "duration": 1.15 },
"styles": ["magictreasures:regular", "magictreasures:great", "mypack:ornate"],
"gems": ["mypack:amber", "magictreasures:ruby", "magictreasures:sapphire"]
}| Key | Default | Meaning |
|---|---|---|
ingredient |
none | What crafts it: a recipe scroll plus 4 of these. Leave it out for a loot-only material |
rarity |
none |
common, uncommon, scarce, rare, epic, legendary or mythical. Used for loot and the piece's rarity. Leave it out for a material only named pieces use |
color |
gray |
#RRGGBB. Tints the shared art when the material has no textures of its own (see Art) |
uses |
required | Durability |
mana |
required | Mana, before the gem and style |
repairs |
0 | Times it can be repaired at the anvil |
recharges |
0 | Times it can be recharged, before the gem's |
max_level |
1 | Highest spell level it can hold, before the style |
spells |
1 | Spells it can hold |
factors |
all 1.0 | Spell multipliers: cost, effect, duration, cooldown, range. Name only the ones that differ |
accepts_gems |
true | Whether a gem can be set in it |
types |
all | Which types it's made as: ["ring", "necklace", "bracelet"]
|
styles |
all | Which styles: a list of ids or a #tag
|
gems |
all | Which gems: a list of ids or a #tag
|
requires_gem |
false | Never made without a gem |
disabled |
false | See Switching something off |
types, styles, gems and requires_gem are the rules: crafting, loot and the creative tab only make
combinations they allow. /magictreasures give makes anything, and says so when the rules wouldn't.
{ "mana": 90, "recharges": 2, "factors": { "duration": 1.20, "effect": 1.05 } }mana (required), recharges and factors add to the material's. Several gems can share a tier; a gem can also
write its tier inline instead of naming one.
{
"item": "minecraft:honeycomb",
"tier": "mypack:amber",
"rarity": "scarce",
"color": "#E8A33A",
"affixes_to": "#magictreasures:metals"
}| Key | Default | Meaning |
|---|---|---|
item |
required | The item that is the gem. Any item, from any mod. If it doesn't exist, this gem is skipped with a warning |
tier |
required | A stone_tier id, or a tier object written inline |
rarity |
none | For gem loot and the piece's rarity |
color |
gray | Tints the shared gem art when the gem has none |
affixes_to |
every material | Which materials it can be set in: an id, a list, or a #tag
|
disabled |
false |
#magictreasures:metals is a tag of materials (iron, copper, silver, gold, blood, shadow, atium). The pack adds
titanium to it with data/magictreasures/tags/magictreasures/jewelry_material/metals.json:
{ "replace": false, "values": ["mypack:titanium"] }{
"name": "jewelry_style.mypack.ornate",
"uses_multiplier": 1.25,
"mana_multiplier": 1.25,
"types": ["ring"]
}| Key | Default | Meaning |
|---|---|---|
uses_multiplier |
1.0 | Uses = material uses × this |
mana_multiplier |
1.0 | Mana = (material mana + tier mana) × this |
max_level |
0 | Added to the material's max level |
repairs |
0 | Added to the material's repairs |
rarity_steps |
0 | Steps added to the piece's rarity (lords adds 2) |
name |
none | Translation key of the word in the name ("Great"). Leave it out for no word |
texture_affix |
the id's path | The word in texture names (see Art). "" for none |
texture_fallback |
none | A style whose art to borrow where this one has none. Great borrows regular's: same shape, bigger |
types |
all | Which types the style exists for |
disabled |
false |
{
"type": "ring",
"material": "mypack:titanium",
"gem": "mypack:amber",
"style": "magictreasures:great",
"name": "jewelry.mypack.ambersmiths_band",
"lore": "jewelry.mypack.ambersmiths_band.lore",
"rarity": "epic",
"spells": ["magictreasures:fire_ward", "magictreasures:strength"],
"overrides": { "max_mana": 400, "max_level": 10, "max_repairs": 2 },
"accepts_gems": false,
"loot": { "weight": 3 }
}A preset names only what differs; everything else is worked out from its material, gem and style like any piece.
| Key | Default | Meaning |
|---|---|---|
type, material
|
required | |
gem, style
|
none, regular | |
name |
composed | Translation key of its name |
lore |
none | Translation key of its lore line; ~ starts a new line |
texture |
see Art | The sprite to draw, e.g. mypack:item/jewelry/ambersmiths_band
|
base_name |
the type | Replaces the type word in composed names and art (the castle ring uses castle_ring) |
rarity |
worked out | Replaces the worked-out rarity |
spells |
none | Spells it starts with. Ids are on Spells, e.g. magictreasures:fire_ward
|
overrides |
none | Replace worked-out stats: max_uses, infinite, max_mana, max_level, max_repairs, max_recharges, and factors (per key) |
accepts_gems |
true | false: the anvil can't set or remove its gem |
extractable |
true | false: Jewelry Pliers can't take its gem out |
gems |
none | Gems it may be given instead of its own: a list or a #tag
|
vanishing_curse |
false | Gets Curse of Vanishing when first carried |
loot |
none | Makes it drop from random jewelry loot of its rarity. weight (default 1) against the others |
disabled |
false |
A titanium ring with amber, regular style:
| Stat | Worked out | Value |
|---|---|---|
| Uses | 300 × 1.0 | 300 |
| Mana | (120 + 90) × 1.0 | 210 |
| Max level | 8 + 0 | 8 |
| Repairs | 3 + 0 | 3 |
| Recharges | 0 + 2 | 2 |
| Factors | material × tier | cost 0.95, duration 1.15 × 1.20 = 1.38, effect 1.05 |
| Rarity | the higher of material and gem, plus the style's steps | rare |
Players craft it with a ring recipe scroll and 4 titanium ingots, then set the amber at an anvil. It also drops from mobs and chests (Treasure2's too) with titanium's and amber's rarities, with no loot JSON.
Write a file at the same path as the built-in one. To give gold more mana, a pack ships
data/magictreasures/magictreasures/jewelry_material/gold.json with the full entry and the new number. The built-in
files are in the mod jar under the same path; copy one and edit it.
Override the entry with "disabled": true. The other required keys must still be there:
{ "item": "magictreasures:topaz", "tier": "magictreasures:tier1", "disabled": true }That topaz no longer counts as a gem: the anvil won't take it and loot won't give it. Jewelry already set with topaz keeps it on the item, but it adds nothing until topaz is switched back on. Disabling a stone tier disables every gem in it.
A disabled material or style is no longer crafted or dropped, and pieces already made with it have no stats until it's switched back on. Disable something before players have it, or leave it on.
Art is optional. Without it, the piece is drawn from Magic Treasures' gray art tinted with the material's and
gem's color. To give a piece real art, add textures to a resource pack. They're looked up in this order, first
found wins:
| Texture | Example | |
|---|---|---|
| 1 | A preset's own: <preset ns>:textures/item/jewelry/<preset>.png (or its texture) |
mypack:textures/item/jewelry/ambersmiths_band.png |
| 2 | The whole piece: <material ns>:textures/item/jewelry/[affix_]<material>_[<gem>_]<type>.png
|
mypack:textures/item/jewelry/titanium_amber_ring.png |
| 3 | Layers: a band and a gem, each looked up on its own (below) |
Layers, for each style in the chain (the style, then its texture_fallback, and so on):
| Layer | Texture | If missing |
|---|---|---|
| Band | <material ns>:textures/item/jewelry/<type>/<material>[_affix].png |
MT's <type>/_base.png, tinted with the material's color
|
| Gem | <gem ns>:textures/item/jewelry/<type>/gem/<gem>[_affix].png |
MT's <type>/gem/_overlay.png, tinted with the gem's color
|
So the cheapest good-looking result is two 16×16 textures: ring/titanium.png and ring/gem/amber.png. Every
titanium ring and every amber-set ring of any material then uses them. Draw them to line up with MT's
ring/_base.png and ring/gem/_overlay.png.
A style with its own shape (the ornate style above) should have no texture_fallback, so a gem drawn for the regular
ring's gem position never lands on its band.
| What | Translation key | Without a lang file |
|---|---|---|
| Material | material.<ns>.<path> |
The id's path, capitalized: "Titanium" |
| Gem | The gem item's own name | |
| Style | The style's name key |
|
| Named piece | The preset's name key |
Composed like any piece |
{
"material.mypack.titanium": "Titanium",
"jewelry_style.mypack.ornate": "Ornate",
"jewelry.mypack.ambersmiths_band": "Ambersmith's Band",
"jewelry.mypack.ambersmiths_band.lore": "Forged where the hive meets the anvil."
}The five lists are read when a world loads. /reload re-reads tags (such as metals) but not new or changed
entries: after changing a material, gem, tier, style or preset, leave the world and open it again.
| Way | Where the files go |
|---|---|
| One world |
<world>/datapacks/mypack/ (or mypack.zip); art in resourcepacks/ and switched on in Options |
| Every world, with Paxi |
config/paxi/datapacks/ and config/paxi/resourcepacks/; order in datapack_load_order.json
|
| Every world, with Open Loader | the data and resource folders under config/openloader/ (see its page for your version) |
| A KubeJS modpack |
kubejs/data/ and kubejs/assets/, with the same paths inside |
For a modpack, a global loader is the safer choice: a pack in one world's datapacks/ doesn't reach new worlds.
| Command | Shows |
|---|---|
/datapack list |
Whether the pack is loaded |
/magictreasures data |
How many materials, styles, tiers, gems and presets loaded; writes each entry to the log |
/magictreasures give @s ring mypack:titanium mypack:amber |
A piece, from any combination (minecraft:none for no gem; a style id after the gem) |
/magictreasures give @s preset mypack:ambersmiths_band |
A named piece |
/magictreasures jewelry |
The held piece's identity and worked-out stats |
A mistake in one of these files stops the world from loading, as it does for vanilla's own datapack lists:
the game shows an error and the log names the file and the problem. Test a pack in a copy of the world. Three gem
problems only skip that gem, with a warning in logs/magictreasures.log: its item doesn't exist (a mod that
isn't installed), its stone tier is disabled, or another gem already uses the same item.