irons_artifice-1.20.1-1.2.0
Curse Maven Snippet
What's new
Additions
- Added gun attributes. Armor, items, potion effects and enchantments, from datapacks or other mods, can now modify gun stats such as damage, fire rate, spread, reload speed and recoil. They also work with the
/attributecommandirons_artifice:damageirons_artifice:projectile_countirons_artifice:spreadirons_artifice:in_air_penaltyirons_artifice:rate_rateirons_artifice:reload_speed_multiplierirons_artifice:ammo_consume_chanceirons_artifice:acceleratingirons_artifice:bullet_speedirons_artifice:gravityirons_artifice:knockbackirons_artifice:bullet_dragirons_artifice:underwater_dragirons_artifice:block_damage_multiplierirons_artifice:piercingirons_artifice:ricochetirons_artifice:seekingirons_artifice:leechirons_artifice:camera_recoil_multiplierirons_artifice:character_blowbackirons_artifice:force_auto_fireirons_artifice:breaks_blocks
- Added gun config to serverconfig. Affects shot parameters. Currently, cannot change gun parameters (magazine size, modifier count).
- Added new small muzzle flash particle
Changes
Fixes
- Fixed stacking Hair Triggers giving some guns an infinite fire rate
API
Soft Breaking Changes
- Value modifier tooltip colors now come from the modified
ComponentType's sentiment, not the modifier. Modifiers your addon applies to Iron's components take that component's color. Your own component types render neutral (yellow) until you pass aComponentType.Sentimentto the new constructor ValueModifier.Type, theValueModifier(amount, operation, type)constructor andValueModifier#typeare deprecated.ValueModifieris now a record ofamountandoperation. The old constructor still compiles but ignorestype, andtype()always returnsNEUTRAL- Record patterns that take three components no longer compile, and
equalsno longer compares the type
- Record patterns that take three components no longer compile, and
Utils#formatValueModifierDescription(ValueModifier, Component)is deprecated and always renders as neutral. Pass theComponentType, or use the new overload that takes aComponentType.SentimentValueModifier.Operationhas a new constant,MULTIPLY_BASE, betweenADDandMULTIPLY_TOTAL. Exhaustive switches overOperationneed a case for itShotProfile#fireDelayTicks()now returns at least 1
Additions
- Added gun attributes, registered in
IronsArtificeAttributesand carried by every living entity. When an entity composes a shot, its gun attribute modifiers are added to the matching shot component- For static stat bonuses (items, armor, mobeffects), prefer attribute modifiers over
ComposeShotEventlisteners. They show in tooltips, sync to clients, and need no code - Attributes are applied before
ComposeShotEventfires. - Number attributes:
irons_artifice:damage,projectile_count,spread,in_air_penalty,fire_rate,reload_speed_multiplier,ammo_consume_chance,accelerating,bullet_speed,gravity,knockback,bullet_drag,underwater_drag,block_damage_multiplier,piercing,ricochet,seeking,leech,camera_recoil_multiplier,character_blowback - Toggle attributes:
irons_artifice:force_auto_fire,irons_artifice:breaks_blocks - Number attributes default to 0 and act as bonuses on top of the gun.
ADD_VALUE,ADD_MULTIPLIED_BASEandADD_MULTIPLIED_TOTALbecomeADD,MULTIPLY_BASEandMULTIPLY_TOTALvalue modifiers. A changed base value is added as a flat bonus - Toggle attributes follow NeoForge's
BooleanAttributeconvention: +1ADD_VALUEenables, -1ADD_MULTIPLIED_TOTALdisables, and disabling wins. A toggle with no modifiers and a default base leaves the gun's own value alone
- For static stat bonuses (items, armor, mobeffects), prefer attribute modifiers over
- Added
IGunAttribute, which exposes its linkedComponentType, with the implementationsGunRangedAttribute(forValuecomponents) andBooleanGunAttribute(forBooleancomponents)- A registered
IGunAttributeapplies to shots automatically, but you must add it to entities yourself inEntityAttributeModificationEvent
- A registered
- Added
ComponentType.Sentiment(POSITIVE,NEUTRAL,NEGATIVE), whether a higher value is better for the shooter. It mirrorsAttribute.Sentiment, and also sets the linked attribute's tooltip color - Added
ValueModifier.Operation.MULTIPLY_BASE, which multiplies the base plus allADDmodifiers, like vanilla'sADD_MULTIPLIED_BASE - Added
Utils#formatValueModifierDescription(ValueModifier, Component, ComponentType.Sentiment) - Added
IronsArtificeItems,IronsArtificeEntities,IronsArtificeSounds,IronsArtificeParticlesandIronsArtificeAttributes, the public registry classesItemRegistry,EntityRegistry,SoundRegistryandParticleRegistryare deprecated. Their fields point to the new registries
CriterionRegistry,DataAttachmentRegistry,DataComponentRegistry,MenuRegistryandExtendedRaiderTypesare now marked@ApiStatus.Internal
All Relations
- All Relations
- Embedded Library
- Optional Dependency
- Required Dependency
- Tool
- Incompatible
- Include