The Dice of Fate no longer hurts players if they're not the right owner.

This commit is contained in:
Lizbeth Rika committed 2015-08-15 18:53:25 +01:00
1 parent 724b03290e
commit a72093a28e
2 files changed
+10 -1

No files matched your search

@@ -80,6 +80,11 @@ public class ItemDice extends ItemRelic {
return stack;
}
@Override
public boolean shouldDamageWrongPlayer() {
return false;
}
boolean hasRelicAlready(EntityPlayer player, int relic) {
if(relic < 0 || relic > 5 || !(player instanceof EntityPlayerMP))
@@ -70,6 +70,10 @@ public class ItemRelic extends ItemMod implements IRelic {
addStringToTooltip(EnumChatFormatting.ITALIC + StatCollector.translateToLocal(name + i), list);
} else addStringToTooltip(StatCollector.translateToLocal("botaniamisc.shiftinfo"), list);
}
public boolean shouldDamageWrongPlayer() {
return true;
}
@Override
public int getEntityLifespan(ItemStack itemStack, World world) {
@@ -95,7 +99,7 @@ public class ItemRelic extends ItemMod implements IRelic {
soulbind = getSoulbindUsernameS(stack);
}
if(!isRightPlayer(player, stack) && player.ticksExisted % 10 == 0)
if(!isRightPlayer(player, stack) && player.ticksExisted % 10 == 0 && ((ItemRelic) stack.getItem()).shouldDamageWrongPlayer())
player.attackEntityFrom(damageSource(), 2);
}