Skip to content

Commit

Permalink
added tick bool
Browse files Browse the repository at this point in the history
  • Loading branch information
CammiePone committed Jan 13, 2025
1 parent b09be2b commit 2197744
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@

public class ArcanusStatusEffect extends MobEffect {
private final boolean shouldSync;
private final boolean shouldTick;

public ArcanusStatusEffect(MobEffectCategory type, int color, boolean shouldSync) {
public ArcanusStatusEffect(MobEffectCategory type, int color, boolean shouldSync, boolean shouldTick) {
super(type, color);
this.shouldSync = shouldSync;
this.shouldTick = shouldTick;
}

public ArcanusStatusEffect(MobEffectCategory type, int color) {
this(type, color, false);
this(type, color, false, false);
}

@Override
Expand Down Expand Up @@ -46,11 +48,12 @@ public void removeAttributeModifiers(LivingEntity entity, AttributeMap attribute
}
}

@Override
public boolean isDurationEffectTick(int duration, int amplifier) {
return shouldTick;
}

// FIXME temporal dilation no worky
// @Override
// public boolean canApplyUpdateEffect(int duration, int amplifier) {
// return this == ArcanusStatusEffects.TEMPORAL_DILATION.get();
// }
//
// @Override
// public void applyUpdateEffect(LivingEntity entity, int amplifier) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ public class ArcanusMobEffects {
public static final RegistrySupplier<MobEffect> VULNERABILITY = MOB_EFFECTS.register("vulnerability", () -> new ArcanusStatusEffect(MobEffectCategory.HARMFUL, 0x3a8e99));
public static final RegistrySupplier<MobEffect> FORTIFY = MOB_EFFECTS.register("fortify", () -> new ArcanusStatusEffect(MobEffectCategory.BENEFICIAL, 0xbbbbbb));
public static final RegistrySupplier<MobEffect> BOUNCY = MOB_EFFECTS.register("bouncy", () -> new ArcanusStatusEffect(MobEffectCategory.NEUTRAL, 0x77ff88));
public static final RegistrySupplier<MobEffect> ANONYMITY = MOB_EFFECTS.register("anonymity", () -> new ArcanusStatusEffect(MobEffectCategory.NEUTRAL, 0x555555, true));
public static final RegistrySupplier<MobEffect> ANONYMITY = MOB_EFFECTS.register("anonymity", () -> new ArcanusStatusEffect(MobEffectCategory.NEUTRAL, 0x555555, true, false));
public static final RegistrySupplier<MobEffect> COPPER_CURSE = MOB_EFFECTS.register("copper_curse", () -> new ArcanusStatusEffect(MobEffectCategory.HARMFUL, 0xc15a36));
public static final RegistrySupplier<MobEffect> DISCOMBOBULATE = MOB_EFFECTS.register("discombobulate", () -> new ArcanusStatusEffect(MobEffectCategory.HARMFUL, 0x7b1375));
// public static final RegistrySupplier<StatusEffect> TEMPORAL_DILATION = STATUS_EFFECTS.register("temporal_dilation", () -> new ArcanusStatusEffect(StatusEffectType.BENEFICIAL, 0x68e1ff, true));
// public static final RegistrySupplier<StatusEffect> TEMPORAL_DILATION = STATUS_EFFECTS.register("temporal_dilation", () -> new ArcanusStatusEffect(StatusEffectType.BENEFICIAL, 0x68e1ff, true, true));
public static final RegistrySupplier<MobEffect> FLOAT = MOB_EFFECTS.register("float", () -> new ArcanusStatusEffect(MobEffectCategory.NEUTRAL, 0xceffff));
public static final RegistrySupplier<MobEffect> MANA_WINGS = MOB_EFFECTS.register("mana_wings", () -> new ArcanusStatusEffect(MobEffectCategory.BENEFICIAL, 0x716e8c, true));
public static final RegistrySupplier<MobEffect> MANA_WINGS = MOB_EFFECTS.register("mana_wings", () -> new ArcanusStatusEffect(MobEffectCategory.BENEFICIAL, 0x716e8c, true, false));
public static final RegistrySupplier<MobEffect> STOCKPILE = MOB_EFFECTS.register("stockpile", () -> new ArcanusStatusEffect(MobEffectCategory.BENEFICIAL, 0x550000));
public static final RegistrySupplier<MobEffect> DANGER_SENSE = MOB_EFFECTS.register("danger_sense", () -> new ArcanusStatusEffect(MobEffectCategory.BENEFICIAL, 0xaeeff2));
public static final RegistrySupplier<MobEffect> SHRINK = MOB_EFFECTS.register("shrink", () -> new ArcanusStatusEffect(MobEffectCategory.NEUTRAL, 0x00ffc8, true));
public static final RegistrySupplier<MobEffect> ENLARGE = MOB_EFFECTS.register("enlarge", () -> new ArcanusStatusEffect(MobEffectCategory.NEUTRAL, 0xff9600, true));
public static final RegistrySupplier<MobEffect> SHRINK = MOB_EFFECTS.register("shrink", () -> new ArcanusStatusEffect(MobEffectCategory.NEUTRAL, 0x00ffc8, true, true));
public static final RegistrySupplier<MobEffect> ENLARGE = MOB_EFFECTS.register("enlarge", () -> new ArcanusStatusEffect(MobEffectCategory.NEUTRAL, 0xff9600, true, true));
}

0 comments on commit 2197744

Please sign in to comment.