Fix and nerf Coat of Arms
It was a bit broken. (~2000 LP for killing a zombie >.>) We'll see how it goes now.
This commit is contained in:
parent
978e50a42e
commit
b34dbfbe4e
|
@ -18,7 +18,7 @@ import java.util.List;
|
|||
|
||||
public class ItemPackSacrifice extends ItemArmor implements IAltarManipulator
|
||||
{
|
||||
public final int CONVERSION = 50; // How much LP per heart
|
||||
public final int CONVERSION = 20; // How much LP per heart
|
||||
public final int CAPACITY = 10000; // Max LP storage
|
||||
|
||||
public ItemPackSacrifice()
|
||||
|
|
|
@ -14,6 +14,7 @@ import net.minecraft.entity.player.EntityPlayerMP;
|
|||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.event.entity.living.LivingAttackEvent;
|
||||
|
@ -77,7 +78,8 @@ public class EventHandler
|
|||
ItemPackSacrifice pack = (ItemPackSacrifice) player.getCurrentArmor(chestIndex).getItem();
|
||||
|
||||
boolean shouldSyphon = pack.getStoredLP(player.getCurrentArmor(chestIndex)) < pack.CAPACITY;
|
||||
int totalLP = Math.round(event.ammount * pack.CONVERSION);
|
||||
float damageDone = event.entityLiving.getHealth() < event.ammount ? event.ammount - event.entityLiving.getHealth() : event.ammount;
|
||||
int totalLP = Math.round(damageDone * pack.CONVERSION);
|
||||
|
||||
if (shouldSyphon)
|
||||
pack.addLP(player.getCurrentArmor(chestIndex), totalLP);
|
||||
|
@ -121,7 +123,6 @@ public class EventHandler
|
|||
@SubscribeEvent
|
||||
public void onTelepose(TeleposeEvent event)
|
||||
{
|
||||
|
||||
if (ConfigHandler.teleposerBlacklist.contains(event.initialStack) || ConfigHandler.teleposerBlacklist.contains(event.finalStack))
|
||||
event.setCanceled(true);
|
||||
|
||||
|
|
Loading…
Reference in a new issue