diff options
| author | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2015-03-23 14:51:06 +0000 |
|---|---|---|
| committer | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2015-03-23 14:51:06 +0000 |
| commit | 6312636fd9a4d0f56dc7c9ff474a99d879bcb4e9 (patch) | |
| tree | e3279753210bfb169a00cd3f146a80baf624150e /java/darkknight/jewelrycraft/curses/CurseInfamy.java | |
| parent | e86949a1ad3269ec66c9de65e2c92f5e66251411 (diff) | |
Reworked the whole repo.
Diffstat (limited to 'java/darkknight/jewelrycraft/curses/CurseInfamy.java')
| -rw-r--r-- | java/darkknight/jewelrycraft/curses/CurseInfamy.java | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/java/darkknight/jewelrycraft/curses/CurseInfamy.java b/java/darkknight/jewelrycraft/curses/CurseInfamy.java deleted file mode 100644 index aa815f7..0000000 --- a/java/darkknight/jewelrycraft/curses/CurseInfamy.java +++ /dev/null @@ -1,41 +0,0 @@ -package darkknight.jewelrycraft.curses; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.monster.EntityMob; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import darkknight.jewelrycraft.damage.DamageSourceList; -import darkknight.jewelrycraft.entities.EntityHalfHeart; -import darkknight.jewelrycraft.entities.EntityHeart; -import darkknight.jewelrycraft.util.JewelrycraftUtil; -import darkknight.jewelrycraft.util.PlayerUtils; - -public class CurseInfamy extends Curse -{ - public CurseInfamy(int id, String name, int text) - { - super(id, name, text); - } - - @Override - public void attackedByPlayerAction(World world, EntityPlayer player, Entity target) - { - if (rand.nextInt(5) == 0 && !world.isRemote && !(target instanceof EntityMob) && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart) && target.canAttackWithItem()){ - NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, "Jewelrycraft"); - if (playerInfo.getFloat("BlackHeart") < 20F) playerInfo.setFloat("BlackHeart", playerInfo.getFloat("BlackHeart") + 1.0F); - if (player.getMaxHealth() >= 3F){ - player.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(player.getMaxHealth() - 1.0F); - player.setHealth(player.getHealth() - 1.0F); - } - JewelrycraftUtil.addCursePoints(player, 10); - } - } - - public String getDescription() - { - return "What have you done?!"; - } -} |
