Package etithespirit.orimod.player
Class EffectEnforcement
java.lang.Object
etithespirit.orimod.player.EffectEnforcement
This class manages the speed, health, and knockback resistance of Spirits.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic 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 TypeMethodDescriptionstatic 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.
-
Field Details
-
SPEED_MOD
public static final net.minecraft.world.entity.ai.attributes.AttributeModifier SPEED_MODThis attribute makes Spirits faster. It is equal to Speed II. -
KNOCKBACK_MOD
public static final net.minecraft.world.entity.ai.attributes.AttributeModifier KNOCKBACK_MODThis attribute makes Spirits immune to knockback. -
HEALTH_MOD
public static final net.minecraft.world.entity.ai.attributes.AttributeModifier HEALTH_MODThis 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.
-