For my Enchanted mod (link in my sig) I'm trying to code enchantments that activate under certain conditions.
The Night Vision enchantment is supposed to activate when the player has a helmet with the enchantment equipped and the light level at the player's current position is 7 or less (i.e. nighttime or caves).
The Regenerate enchantment is supposed to activate when the player's hit timer is zero and damages the armour much faster.
The Ironguard enchantment is supposed to active when another player gets a critical hit on the player with the Ironguard armour.
The Swift enchantment is supposed to provide a constant speed boost and damages the armour much faster.
Unfortunately, everything I've tried doesn't work. The Respiration code doesn't seem to work for the Night Vision enchantment (yes, I've modified the code correctly).
Also, I'm trying to make a Thorns-type enchantment that sets enemies on fire instead of damaging them, how would I do that?
Sorry for being so incompetent, but I need help. Anyone? ._.
The Night Vision enchantment is supposed to activate when the player has a helmet with the enchantment equipped and the light level at the player's current position is 7 or less (i.e. nighttime or caves).
The Regenerate enchantment is supposed to activate when the player's hit timer is zero and damages the armour much faster.
The Ironguard enchantment is supposed to active when another player gets a critical hit on the player with the Ironguard armour.
The Swift enchantment is supposed to provide a constant speed boost and damages the armour much faster.
Unfortunately, everything I've tried doesn't work. The Respiration code doesn't seem to work for the Night Vision enchantment (yes, I've modified the code correctly).
Also, I'm trying to make a Thorns-type enchantment that sets enemies on fire instead of damaging them, how would I do that?
Sorry for being so incompetent, but I need help. Anyone? ._.