Rewrite IBindable to provide an object instead of storing 2 strings

This commit is contained in:
Nicholas Ignoffo 2018-02-27 16:59:51 -08:00
parent 941173dbf4
commit 2a43e53842
47 changed files with 416 additions and 510 deletions

View file

@ -7,24 +7,29 @@ import net.minecraftforge.fml.common.eventhandler.Event;
@Cancelable
public class ItemBindEvent extends Event {
public final EntityPlayer player;
public String key;
public ItemStack itemStack;
private final EntityPlayer player;
private final ItemStack itemStack;
/**
* This event is called whenever a player attempts to bind a
* {@link WayofTime.bloodmagic.iface.IBindable} item.
*
* @param player The player doing the binding
* @param key The UUID of the player doing the binding
* @param itemStack The {@link ItemStack} that the player is binding
* <p>
* This event is {@link Cancelable}.<br>
*/
public ItemBindEvent(EntityPlayer player, String key, ItemStack itemStack) {
super();
public ItemBindEvent(EntityPlayer player, ItemStack itemStack) {
this.player = player;
this.key = key;
this.itemStack = itemStack;
}
public EntityPlayer getNewOwner() {
return player;
}
public ItemStack getBindingStack() {
return itemStack;
}
}