From 208b1f1e0d5faf601b53818b04f6699b2e6cb6bc Mon Sep 17 00:00:00 2001 From: OnyxDarkKnight Date: Tue, 5 May 2015 22:07:10 +0100 Subject: - Working on a GUI showing what curses you get with a description on them - Added a search bar in the Liquids Tab for easier searching - Fixed an issue with golden objects giving errors due to missing default texture - Improved the Infamy Mask to have less parts, thus causing less lag - Improved ingots and ore detection - Fixed certain ores when smelted outputting a different ingot - Necklaces and Rings now render as well - Updated the guide at the Guide item to have the proper link to the mod as well as mention the right people who helped with it - Added a list of the ores that work in the guide - Added a new tab to the guide regarding the ores and the ingots they create - Changed the stun effect caused by rings with feathers as modifiers to be a potion effect instead --- src/main/java/darkknight/jewelrycraft/effects/EffectFeather.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/main/java/darkknight/jewelrycraft/effects/EffectFeather.java') diff --git a/src/main/java/darkknight/jewelrycraft/effects/EffectFeather.java b/src/main/java/darkknight/jewelrycraft/effects/EffectFeather.java index c9cdf06..c0e2ff8 100644 --- a/src/main/java/darkknight/jewelrycraft/effects/EffectFeather.java +++ b/src/main/java/darkknight/jewelrycraft/effects/EffectFeather.java @@ -3,7 +3,7 @@ package darkknight.jewelrycraft.effects; import java.util.Iterator; import java.util.List; import net.minecraft.entity.Entity; -import net.minecraft.entity.SharedMonsterAttributes; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityArrow; import net.minecraft.init.Items; @@ -22,6 +22,7 @@ import darkknight.jewelrycraft.item.ItemBracelet; import darkknight.jewelrycraft.item.ItemEarrings; import darkknight.jewelrycraft.item.ItemNecklace; import darkknight.jewelrycraft.item.ItemRing; +import darkknight.jewelrycraft.potions.PotionList; import darkknight.jewelrycraft.util.JewelryNBT; import darkknight.jewelrycraft.util.PlayerUtils; import darkknight.jewelrycraft.util.Variables; @@ -71,10 +72,7 @@ public class EffectFeather extends ModifierEffects enemyData.setInteger("reAttacked", enemyData.getInteger("reAttacked") + 1); target.attackEntityFrom(DamageSource.causePlayerDamage(player), amount / (2F + (JewelryNBT.numberOfModifiers(item) - 1) * 0.1F)); // Positive ring - if (rand.nextInt(2) == 0){ - enemyData.setInteger("stunTime", 51 - JewelryNBT.numberOfModifiers(item)); - enemyData.setBoolean("stunned", true); - } + if (rand.nextInt(2) == 0 && target instanceof EntityLivingBase) ((EntityLivingBase)target).addPotionEffect(new PotionEffect(PotionList.stun.id, (51 - JewelryNBT.numberOfModifiers(item))*2, 0, false)); playerInfo.setBoolean("weakDamage", true); } if (enemyData.getInteger("reAttacked") == 1) enemyData.setInteger("reAttacked", 0); -- cgit v1.2.3