This page contains a variety of information surround what can be customized via datapack. If you’re looking for developmental help, you can join us on Discord:
Patterns, Parts, and Materials
Patterns, Parts, and Materials are all data-registered files, under data/<namespace>/irons_jewelry/<dir> for your namespace and the respective pattern, part, and material directories.
Patterns
Patterns are the blueprint for a complete piece of jewelry. Patterns can be unlocked by the player by default, or not. Unlocking a pattern requires learning from an Artisan Scroll item, which generate as loot and as villager trades. In order for patterns you create to drop in loot or trades, you must add your pattern to the respective pattern tags. Some of those tags include:
#irons_jewelry:generic_lootable#irons_jewelry:high_quality_lootable#irons_jewelry:trader_sellable- See all pattern tags here
Patterns are composed of part ingredients (part definitions combined with material costs) and determine the bonus a worn piece of this jewelry will provide. This is where the generic buffs are assigned, such as “this ring provides an attribute”.
- PatternDefinition :
- descriptionId : String denoting language file entry
- type :
ResourceLocationpointing to a registeredJewelryType - unlockedByDefault : (Optional) (Default:
true) Whether this pattern is always available in the jewelcrafting station, or must be unlocked before it can be crafted - qualityMultiplier : (Optional) (Default:
1.0) Multiplies overall quality of the buffs received from a completed item of this pattern - partForQuality : (Optional)
ResourceLocationused to specify which part of the pattern will determine the overall quality. If absent, the base quality is 1.0 - parts : Array of
PartIngredient- PartIngredient : PartIngredient object
- id : ResourceLocation of
PartDefinition - materialCost : Count of items required to craft this part in the jewelcrafting station
- drawOrder : Sort order for drawing this sprite. Lower numbers are drawn first (appear at the bottom)
- bonuses : (Optional) Array of
Bonus- Bonus : Object holding data to construct a buff for this jewelry piece when worn
- bonusType : ResourceLocation used for BonusType registry
- qualityMultiplier : Multiplies overall quality of the buff received from this bonus
- cooldown : (Optional)
QualityScalarproviding a cooldown in ticks. Not all bonuses utilize cooldowns. - parameterType : (Optional)
Tuple<ParameterType<T>,T>. If present, overrides the bonus parameter that would have been selected from the material this part is made out of.
- Bonus : Object holding data to construct a buff for this jewelry piece when worn
- id : ResourceLocation of
- PartIngredient : PartIngredient object
Part Definitions
Part Definitions are the definitions for the individual components that can be used to construct a piece of jewelry. These mostly hold rendering information, but also what materials are allowed to make this part.
- PartDefinition :
- descriptionId : String denoting language file entry
- paletteKey :
ResourceLocationto a texture file that is the palette key for this part's texture - allowedMaterialTypes : (Optional) List of strings
- String : A material must have at least one matching type in order to be allowed to be used to construct this part.
- baseTextureLocation :
ResourceLocationto a texture file of this part's texture
Material Definitions
Material Definitions associate ingredient items with a material that can be used in jewelcrafting. Defined here are the specific bonus parameters the material awards, as well as rendering information. A material can host multiple parameter entries, which are used as input for the overall pattern’s bonus. For example, if a ring pattern grants an attribute bonus, the material of the ring provides the specific attribute.
- MaterialDefinition :
- descriptionId : String denoting language file entry
- ingredient :
Ingredientfor what items are used to create this material - allowedMaterialTypes : List of strings
- String : A material must have at least one matching tr in order to be allowed to be used to construct this part.
- paletteLocation :
ResourceLocationpointing to the palette texture file for this material - quality : Quality value associated with this material.
- bonusParameters :
Map<ParameterType<T>,T>-
ResourceLocation: Points to the ParameterType entry-
Bonus Parameter Value: Definition of a Parameter Type's value
-
-
Quality Scalars
Throughout many other schemas, you will see Quality Scalars. This is a number provider that scales based on the quality of a piece of jewelry. It can scale positively or negatively, such as a buff duration or cooldown time. The sampled number has the formula: base + (q - 1) * scalar for some input quality q.
- QualityScalar : A provider of a
doublethat scales based on an input quality.- base : Initial amount
- scalar : Amount that increases with respect to the bonus's quality
- min : (Optional: default
0.0) Minimum magnitude for the scalar's quantity when sampled - max : (Optional) Maximum magnitude for the scalar's quantity when sampled
Registered Types
Jewelry Types
Jewelry Types provide the association between a pattern and an item. Custom jewelry types can be registered through code.
irons_jewelry:ringirons_jewelry:necklace
Bonus Types
Bonus types are registered behaviors that execute on an input bonus parameter. Custom bonus types can be made through code.
irons_jewelry:piglin_neutral_bonus- Utilizes
irons_jewelry:emptyparameter type - Makes piglins neutral to the wearer
- Utilizes
irons_jewelry:attribute_bonus- Utilizes Attribute parameter type
- Provides an attribute modifier to the wearer
irons_jewelry:effect_on_hit_bonus- Utilizes Positive Effect parameter type
- Applies a mob effect to wearer when the wearer hits an entity
irons_jewelry:on_projectile_hit_bonus- Utilizes Action parameter type
- Executes an action when the wearer hits an entity with a projectile
irons_jewelry:on_attack_bonus- Utilizes Action parameter type
- Executes an action when the wearer attacks an entity directly
irons_jewelry:effect_immunity_bonus- Utilizes Negative Effect parameter type
- Grants immunity to a mob effect
irons_jewelry:on_shield_block_bonus- Utilizes Action parameter type
- Executes an action when the wearer blocks an attack with a shield
irons_jewelry:on_take_damage_bonus- Utilizes Action parameter type
- Executes an action when the wearer takes damage
Bonus Parameter Types
Bonus Parameter Types are a registered type object associated with a data class. This data class is used as context for the behavior of a bonus type. The instances of these data objects live on the material definition, which are picked based on the material a jewelry is made out of.
irons_jewelry:attribute(See Attribute Instance schema)irons_jewelry:positive_effect(See EffectParameter schema)irons_jewelry:negative_effect(See EffectParameter schema)irons_jewelry:action(See Action Runnable schema)
Bonus Parameter Values
Attribute Instance
- AttributeInstance : Object holding the information to build an attribute modifier for a piece of jewelry
- attribute :
ResourceLocationpointing to anAttribute - amount : Value given by this attribute
- operation : add_value | add_multiplied_base | add_multiplied_total
- attribute :
Effect Parameter
- EffectParameter : Object providing a
MobEffectfor the bonus to utilize- effect :
ResourceLocationpointing to aMobEffect
- effect :
Action Runnable
- ActionRunnable : Object holding the information to run an action to the bonus's specifications
- applyToSelf : Whether the action should target the wearer, or the causal entity
- action :
Actionobject- type :
ResourceLocationpointing to a registered action - Action : Definition of any registered action schema
- type :
Actions
Action are special buffs that, when triggered, actually do something. Custom Actions can be registered through code. The following actions exist by default:
irons_jewelry:knockback(See Knockback schema)irons_jewelry:ignite(See Ignite schema)irons_jewelry:apply_effect(See Apply Effect schema)irons_jewelry:apply_damage(See Apply Damage schema)irons_jewelry:apply_freeze(See Apply Freeze schema)irons_jewelry:heal(See Heal schema)irons_jewelry:explode(See Explode schema)irons_jewelry:create_items(See Create Items schema)
Action Schemas
Knockback
- KnockbackAction : Root Object Desc
- strength :
QualityScalarrepresenting the strength of the knockback. Negative values pull entities inwards.
- strength :
Ignite
- IgniteAction : Root Object Desc
- tickDuration :
QualityScalarrepresenting the duration of the ignition in ticks
- tickDuration :
Apply Effect
- ApplyEffectAction : Root Object Desc
- duration :
QualityScalarof the effect's duration - amplifier :
QualityScalarof the effect's amplifier - effect :
ResourceLocationpointing to an object of typeMOB_EFFECT
- duration :
Apply Damage
- ApplyDamageAction : Root Object Desc
- damageType :
ResourceLocationof a DamageType - amount :
QualityScalarof the amount of damage done - maximum : (Optional) Damage value cap
- sound : (Optional)
ResourceLocationof a SoundEvent. If present, the sound is played when damage occurs.
- damageType :
Apply Freeze
- ApplyFreezeAction : Root Object Desc
- amount :
QualityScalarrepresenting the freeze amount - instaFreeze : (Optional) Whether the freeze effect is instant; defaults to false
- amount :
Heal
- HealAction : Root Object Desc
- amount :
QualityScalarrepresenting the amount of healing
- amount :
Explode
- ExplodeAction : Root Object Desc
- affect_self : (Optional: default
true) Whether the wearer should be affected by the knockback and/or damage of the explosion - attribute_to_user : (Optional: default
false) Whether the wearer should set as the owner/causing entity of the explosion - translation : Description ID of the name of this explosion, used in the tooltip
- damage_type : (Optional)
ResourceLocationpointing to aDamageType. If present, the explosion will deal damage of this type - knockback_multiplier : (Optional)
QualityScalarthat will multiply the received knockback of affected entities - immune_blocks : (Optional) Holder set of
ResourceLocationthat point to blocks which will not be affected by terrain damage, if this explosion does terrain damage - offset : (Optional)
Vec3to offset the origin point of the explosion - radius :
QualityScalarof the radius of the explosion. This affects damage - create_fire : (Optional: default
false) Whether the explosion should light the area on fire - block_interaction : none | block | mob | tnt | trigger
- small_particle :
ResourceLocationpointing to aParticleTypeto be played on explosion - large_particle :
ResourceLocationpointing to aParticleTypeto be played on explosion - sound :
ResourceLocationpointing to aSoundEventto be played on explosion
- affect_self : (Optional: default
Create Items
- CreateItemsAction : Root Object Desc
- chance : (Optional)
QualityScalarrepresenting the chance to create items - item :
ResourceLocationpointing to an object of typeITEM - sound : (Optional)
ResourceLocationpointing to an object of typeSOUND_EVENT - minCount :
QualityScalarrepresenting the minimum count of items to create - maxCount :
QualityScalarrepresenting the maximum count of items to create
- chance : (Optional)