@@ -65,8 +65,6 @@ public enum Archetype { ARCHERY, MAGIC, MELEE }
6565 @ Nullable public RegistryEntry <EntityAttribute > attributeEntry ;
6666 @ Nullable public RegistryEntry <Potion > potionEntry ;
6767
68- public float innateBonus = 0 ;
69-
7068 public SpellSchool (Archetype archetype , Identifier id , int color , RegistryKey <DamageType > damageType , RegistryEntry <EntityAttribute > attributeEntry ) {
7169 this (archetype , id , color , damageType , null , null );
7270 this .attributeEntry = attributeEntry ;
@@ -79,30 +77,6 @@ public SpellSchool(Archetype archetype, Identifier id, int color, RegistryKey<Da
7977 this .damageType = damageType ;
8078 this .ownedAttribute = attribute ;
8179 this .ownedBoostEffect = boostEffect ;
82- this .innateBonus = SpellPowerMod .attributesConfig .safeValue ().base_spell_power ;
83- }
84-
85- public SpellSchool innateModifier (float value ) {
86- this .innateBonus = 0F ;
87- return this ;
88- }
89-
90- public boolean hasInnateModifier () {
91- return innateBonus >= 0F ;
92- }
93-
94- private Supplier <EntityAttributeModifier > innateModifier = Suppliers .memoize (() ->
95- new EntityAttributeModifier (
96- ModifierDefinitions .INNATE_BONUS ,
97- this .getInnateBonus (),
98- EntityAttributeModifier .Operation .ADD_VALUE
99- )
100- );
101- private float getInnateBonus () {
102- return innateBonus ;
103- }
104- public EntityAttributeModifier getInnateModifier () {
105- return innateModifier .get ();
10680 }
10781
10882 public float attributeBaseValue () {
@@ -134,6 +108,10 @@ public boolean ownsAttribute() {
134108 return ownedAttribute != null ;
135109 }
136110
111+ public boolean isMagicArchetype () {
112+ return archetype == Archetype .MAGIC ;
113+ }
114+
137115 // Sources
138116 public enum Apply { ADD , MULTIPLY }
139117 public record QueryArgs (LivingEntity entity ) { }
0 commit comments