2015-11-07 11:51:41 -05:00
|
|
|
package WayofTime.bloodmagic.api.event;
|
|
|
|
|
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
2016-03-22 21:10:05 -04:00
|
|
|
import net.minecraft.item.ItemStack;
|
2015-11-07 11:51:41 -05:00
|
|
|
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
|
|
|
import net.minecraftforge.fml.common.eventhandler.Event;
|
|
|
|
|
|
|
|
@Cancelable
|
2015-12-30 15:34:40 -05:00
|
|
|
public class SacrificeKnifeUsedEvent extends Event
|
|
|
|
{
|
2015-11-07 11:51:41 -05:00
|
|
|
public final EntityPlayer player;
|
2015-11-28 18:25:46 -08:00
|
|
|
public final int healthDrained;
|
2016-01-05 12:17:05 -05:00
|
|
|
public int lpAdded;
|
2015-11-07 11:51:41 -05:00
|
|
|
public boolean shouldDrainHealth;
|
|
|
|
public boolean shouldFillAltar;
|
|
|
|
|
2016-03-22 21:10:05 -04:00
|
|
|
/**
|
2016-04-05 16:16:17 -04:00
|
|
|
* This event is called whenever a player attempts to use a
|
|
|
|
* {@link WayofTime.bloodmagic.item.ItemSacrificialDagger} to self-sacrifice
|
|
|
|
* near an altar.
|
|
|
|
*
|
2016-03-22 21:10:05 -04:00
|
|
|
* @param player
|
|
|
|
* The player doing the sacrificing
|
|
|
|
* @param shouldDrainHealth
|
|
|
|
* Determines whether or not health is lost
|
|
|
|
* @param shouldFillAltar
|
|
|
|
* Determines whether or not an altar should be filled
|
|
|
|
* @param hp
|
|
|
|
* Amount of health lost
|
|
|
|
* @param lpAdded
|
|
|
|
* Amount of LP added to the altar
|
2016-04-05 16:16:17 -04:00
|
|
|
*
|
|
|
|
* This event is {@link Cancelable}.<br>
|
2016-03-22 21:10:05 -04:00
|
|
|
*/
|
2016-01-05 12:17:05 -05:00
|
|
|
public SacrificeKnifeUsedEvent(EntityPlayer player, boolean shouldDrainHealth, boolean shouldFillAltar, int hp, int lpAdded)
|
2015-12-30 15:34:40 -05:00
|
|
|
{
|
2015-11-07 11:51:41 -05:00
|
|
|
this.player = player;
|
|
|
|
this.shouldDrainHealth = shouldDrainHealth;
|
|
|
|
this.shouldFillAltar = shouldFillAltar;
|
|
|
|
this.healthDrained = hp;
|
2016-01-05 12:17:05 -05:00
|
|
|
this.lpAdded = lpAdded;
|
2015-11-07 11:51:41 -05:00
|
|
|
}
|
|
|
|
}
|