2018-02-15 18:49:01 -08:00
|
|
|
package WayofTime.bloodmagic.event;
|
2015-12-29 14:32:35 -05:00
|
|
|
|
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
|
|
|
import net.minecraftforge.fml.common.eventhandler.Event;
|
|
|
|
|
2017-08-15 21:30:48 -07:00
|
|
|
public class BoundToolEvent extends Event {
|
2015-12-29 14:32:35 -05:00
|
|
|
public EntityPlayer player;
|
|
|
|
|
2017-08-15 21:30:48 -07:00
|
|
|
public BoundToolEvent(EntityPlayer player) {
|
2015-12-29 14:32:35 -05:00
|
|
|
this.player = player;
|
|
|
|
}
|
|
|
|
|
2016-03-22 21:10:05 -04:00
|
|
|
/**
|
2016-04-05 16:16:17 -04:00
|
|
|
* This event is called when a
|
|
|
|
* {@link WayofTime.bloodmagic.item.ItemBoundTool} is being charged.
|
2017-08-15 21:30:48 -07:00
|
|
|
* <p>
|
2016-03-22 21:10:05 -04:00
|
|
|
* If canceled, will result in the charging being canceled.
|
|
|
|
*/
|
|
|
|
|
2015-12-29 14:32:35 -05:00
|
|
|
@Cancelable
|
2017-08-15 21:30:48 -07:00
|
|
|
public static class Charge extends BoundToolEvent {
|
2015-12-29 14:32:35 -05:00
|
|
|
public ItemStack result;
|
|
|
|
|
2017-08-15 21:30:48 -07:00
|
|
|
public Charge(EntityPlayer player, ItemStack result) {
|
2015-12-29 14:32:35 -05:00
|
|
|
super(player);
|
|
|
|
this.result = result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-03-22 21:10:05 -04:00
|
|
|
/**
|
2016-04-05 16:16:17 -04:00
|
|
|
* This event is called when a
|
|
|
|
* {@link WayofTime.bloodmagic.item.ItemBoundTool}'s charge is released.
|
2017-08-15 21:30:48 -07:00
|
|
|
* <p>
|
2016-03-22 21:10:05 -04:00
|
|
|
* If canceled, will result in the charge not being released.
|
|
|
|
*/
|
|
|
|
|
2015-12-29 14:32:35 -05:00
|
|
|
@Cancelable
|
2017-08-15 21:30:48 -07:00
|
|
|
public static class Release extends BoundToolEvent {
|
2015-12-29 14:32:35 -05:00
|
|
|
public final ItemStack boundTool;
|
|
|
|
public int charge;
|
|
|
|
|
2017-08-15 21:30:48 -07:00
|
|
|
public Release(EntityPlayer player, ItemStack boundTool, int charge) {
|
2015-12-29 14:32:35 -05:00
|
|
|
super(player);
|
|
|
|
this.boundTool = boundTool;
|
|
|
|
this.charge = charge;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|