From 6312636fd9a4d0f56dc7c9ff474a99d879bcb4e9 Mon Sep 17 00:00:00 2001 From: OnyxDarkKnight Date: Mon, 23 Mar 2015 14:51:06 +0000 Subject: Reworked the whole repo. --- .../jewelrycraft/curses/CurseInfamy.java | 41 ---------------------- 1 file changed, 41 deletions(-) delete mode 100644 java/darkknight/jewelrycraft/curses/CurseInfamy.java (limited to 'java/darkknight/jewelrycraft/curses/CurseInfamy.java') 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?!"; - } -} -- cgit v1.2.3