Class EffectEnforcement

java.lang.Object
etithespirit.orimod.player.EffectEnforcement

public final class EffectEnforcement extends Object
This class manages the speed, health, and knockback resistance of Spirits.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraft.world.entity.ai.attributes.AttributeModifier
    This attribute makes Spirits have only half the health of a player.
    static final net.minecraft.world.entity.ai.attributes.AttributeModifier
    This attribute makes Spirits immune to knockback.
    static final net.minecraft.world.entity.ai.attributes.AttributeModifier
    This attribute makes Spirits faster.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    resetPlayerAttrs(net.minecraft.world.entity.player.Player player)
    Removes the spirit speed, knockback, and health modifications.
    static void
    updatePlayerAttrs(net.minecraft.world.entity.player.Player player)
    Removes pre-existing spirit speed, knockback, and health modifications, then adds a set of new ones.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • SPEED_MOD

      public static final net.minecraft.world.entity.ai.attributes.AttributeModifier SPEED_MOD
      This attribute makes Spirits faster. It is equal to Speed II.
    • KNOCKBACK_MOD

      public static final net.minecraft.world.entity.ai.attributes.AttributeModifier KNOCKBACK_MOD
      This attribute makes Spirits immune to knockback.
    • HEALTH_MOD

      public static final net.minecraft.world.entity.ai.attributes.AttributeModifier HEALTH_MOD
      This attribute makes Spirits have only half the health of a player.
  • Method Details

    • resetPlayerAttrs

      public static void resetPlayerAttrs(net.minecraft.world.entity.player.Player player)
      Removes the spirit speed, knockback, and health modifications.
      Parameters:
      player - The player to modify.
    • updatePlayerAttrs

      public static void updatePlayerAttrs(net.minecraft.world.entity.player.Player player)
      Removes pre-existing spirit speed, knockback, and health modifications, then adds a set of new ones.
      Parameters:
      player - The player to modify.