Class SevenElementsAttributes
java.lang.Object
io.github.xrickastley.sevenelements.factory.SevenElementsAttributes
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final List<RegistryEntry<EntityAttribute>> static final RegistryEntry<EntityAttribute> static final RegistryEntry<EntityAttribute> static final RegistryEntry<EntityAttribute> static final RegistryEntry<EntityAttribute> static final RegistryEntry<EntityAttribute> static final RegistryEntry<EntityAttribute> static final RegistryEntry<EntityAttribute> static final RegistryEntry<EntityAttribute> static final RegistryEntry<EntityAttribute> static final RegistryEntry<EntityAttribute> static final RegistryEntry<EntityAttribute> static final RegistryEntry<EntityAttribute> private static final Map<Element, ConcurrentHashMap<SevenElementsAttributes.ModifierType, RegistryEntry<EntityAttribute>>> static final RegistryEntry<EntityAttribute> static final RegistryEntry<EntityAttribute> static final RegistryEntry<EntityAttribute> static final RegistryEntry<EntityAttribute> private static boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(DefaultAttributeContainer.Builder builder) private static EntityAttributecreateAttribute(String name, double base, double min, double max) private static doublegetRESMultiplier(LivingEntity target, RegistryEntry<EntityAttribute> resAttribute) private static voidlink(RegistryEntry<EntityAttribute> attribute, Element element, SevenElementsAttributes.ModifierType modifierType) static floatmodifyDamage(LivingEntity target, ElementalDamageSource source, float amount) Modifies the provided damage, applying Resistances and DMG Bonus to it.static voidregister()private static RegistryEntry<EntityAttribute> register(String name, EntityAttribute attribute)
-
Field Details
-
ADDED_ATTRIBUTES
-
LINKS
private static final Map<Element,ConcurrentHashMap<SevenElementsAttributes.ModifierType, LINKSRegistryEntry<EntityAttribute>>> -
registered
private static boolean registered -
PHYSICAL_DMG_BONUS
-
PYRO_DMG_BONUS
-
HYDRO_DMG_BONUS
-
ANEMO_DMG_BONUS
-
ELECTRO_DMG_BONUS
-
DENDRO_DMG_BONUS
-
CRYO_DMG_BONUS
-
GEO_DMG_BONUS
-
PHYSICAL_RES
-
PYRO_RES
-
HYDRO_RES
-
ANEMO_RES
-
ELECTRO_RES
-
DENDRO_RES
-
CRYO_RES
-
GEO_RES
-
-
Constructor Details
-
SevenElementsAttributes
public SevenElementsAttributes()
-
-
Method Details
-
register
public static void register() -
modifyDamage
Modifies the provided damage, applying Resistances and DMG Bonus to it.- Parameters:
target- The target that will receive the DMG.source- TheElementalDamageSourceto use in modifying the damage.amount- The current amount of DMG being dealt.- Returns:
- The modified amount of DMG that should be dealt.
-
apply
-
getRESMultiplier
private static double getRESMultiplier(LivingEntity target, RegistryEntry<EntityAttribute> resAttribute) -
link
private static void link(RegistryEntry<EntityAttribute> attribute, Element element, SevenElementsAttributes.ModifierType modifierType) -
register
-
createAttribute
-