Skip to content

Commit

Permalink
Update effects code
Browse files Browse the repository at this point in the history
  • Loading branch information
ZsoltMolnarrr committed Sep 8, 2024
1 parent 6726ff5 commit 34b8254
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/java/net/wizards/effect/Effects.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import java.util.ArrayList;

public class Effects {
private static ArrayList<Entry> entries = new ArrayList<>();
private static final ArrayList<Entry> entries = new ArrayList<>();
public static class Entry {
public final Identifier id;
public final StatusEffect effect;
Expand All @@ -32,6 +32,10 @@ public Entry(String name, StatusEffect effect) {
public void register() {
registryEntry = Registry.registerReference(Registries.STATUS_EFFECT, id, effect);
}

public Identifier modifierId() {
return Identifier.of(WizardsMod.ID, "effect." + id.getPath());
}
}

public static Entry frozen = new Entry("frozen",
Expand Down Expand Up @@ -67,7 +71,7 @@ public static void register() {
/// Adding attribute modifier here due to relying on config value
arcaneCharge.effect.addAttributeModifier(
SpellSchools.ARCANE.attributeEntry,
Identifier.of(WizardsMod.ID, "effect.arcane_charge"),
arcaneCharge.modifierId(),
WizardsMod.tweaksConfig.value.arcane_charge_damage_per_stack,
EntityAttributeModifier.Operation.ADD_MULTIPLIED_TOTAL);

Expand Down

0 comments on commit 34b8254

Please sign in to comment.