BloodMagic/src/main/java/WayofTime/bloodmagic/apibutnotreally/event/BoundToolEvent.java

51 lines
1.4 KiB
Java
Raw Normal View History

package WayofTime.bloodmagic.apibutnotreally.event;
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 {
public EntityPlayer player;
2017-08-15 21:30:48 -07:00
public BoundToolEvent(EntityPlayer player) {
this.player = player;
}
/**
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>
* If canceled, will result in the charging being canceled.
*/
@Cancelable
2017-08-15 21:30:48 -07:00
public static class Charge extends BoundToolEvent {
public ItemStack result;
2017-08-15 21:30:48 -07:00
public Charge(EntityPlayer player, ItemStack result) {
super(player);
this.result = result;
}
}
/**
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>
* If canceled, will result in the charge not being released.
*/
@Cancelable
2017-08-15 21:30:48 -07:00
public static class Release extends BoundToolEvent {
public final ItemStack boundTool;
public int charge;
2017-08-15 21:30:48 -07:00
public Release(EntityPlayer player, ItemStack boundTool, int charge) {
super(player);
this.boundTool = boundTool;
this.charge = charge;
}
}
}