From 4f7ad220df0438b6f3382110577b53f29da46453 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Thu, 24 May 2018 15:50:07 -0400 Subject: Update of all changes --- .../darkknight/jewelrycraft/api/IJewelryItem.java | 152 +++++++++++++-------- 1 file changed, 95 insertions(+), 57 deletions(-) mode change 100644 => 100755 src/main/java/darkknight/jewelrycraft/api/IJewelryItem.java (limited to 'src/main/java/darkknight/jewelrycraft/api/IJewelryItem.java') diff --git a/src/main/java/darkknight/jewelrycraft/api/IJewelryItem.java b/src/main/java/darkknight/jewelrycraft/api/IJewelryItem.java old mode 100644 new mode 100755 index 576f12b..c4a2c7a --- a/src/main/java/darkknight/jewelrycraft/api/IJewelryItem.java +++ b/src/main/java/darkknight/jewelrycraft/api/IJewelryItem.java @@ -13,63 +13,101 @@ import net.minecraftforge.event.entity.player.PlayerEvent; * @author Sorin * */ -public interface IJewelryItem -{ - /** - * @return Returns the id of the type, 0 is for ring, 1 is for bracelet, 2 is for necklace and 3 is for earrings - */ - public int type(); - - /** - * This is the action performed each player tick - * @param item The item stack of the item (allows for fine item search, like metadata and nbt) - * @param player The player wearing the jewelry - */ - public void onWearAction(ItemStack item, EntityPlayer player); - - /** - * This performs an action whenever a player gets attacked by an entity besides another Player - * @param item The item stack of the item (allows for fine item search, like metadata and nbt) - * @param player The player that was attacked - * @param source Source of the damage - * @param amount The amount of damage taken - */ - public void onPlayerAttackedAction(ItemStack item, EntityPlayer player, DamageSource source, float amount); - - /** - * This does an action whenever an Entity gets attacked by a player, this includes other Players - * @param item The item stack of the item (allows for fine item search, like metadata and nbt) - * @param player The attacking player - * @param entity The target entity - * @param amount The amount of damage dealt - */ - public void onEntityAttackedByPlayer(ItemStack item, EntityPlayer player, EntityLivingBase entity, float amount); - - /** - * This runs whenever a player dies - * @param item The item stack of the item (allows for fine item search, like metadata and nbt) - * @param player The player that died - * @param source The damage source that caused the death - */ - public void onPlayerDeadAction(ItemStack item, EntityPlayer player, DamageSource source); - - /** - * Runs whenever a player respawns (switches dimensions or actually respawns) - * @param item The item stack of the item (allows for fine item search, like metadata and nbt) - * @param player The player that respawns - * @param event The clone event that runs whenever a player respawns, either because he died or switched dimensions - */ - public void onPlayerRespawnAction(ItemStack item, PlayerEvent.Clone event); +public interface IJewelryItem { + /** + * @return Returns the id of the type, 0 is for ring, 1 is for + * bracelet, 2 is for necklace and 3 is for earrings + */ + public int type(); - /** - * This runs when the item is equipped - * @param item The item stack of the item (allows for fine item search, like metadata and nbt) - */ - public void onJewelryEquipped(ItemStack item); + /** + * This is the action performed each player tick + * + * @param item + * The item stack of the item (allows for fine item search, + * like metadata and nbt) + * @param player + * The player wearing the jewelry + */ + public void onWearAction(ItemStack item, EntityPlayer player); - /** - * This runs when the item is unequipped - * @param item The item stack of the item (allows for fine item search, like metadata and nbt) - */ - public void onJewelryUnequipped(ItemStack item); + /** + * This performs an action whenever a player gets attacked by an entity + * besides another Player + * + * @param item + * The item stack of the item (allows for fine item search, + * like metadata and nbt) + * @param player + * The player that was attacked + * @param source + * Source of the damage + * @param amount + * The amount of damage taken + */ + public void onPlayerAttackedAction(ItemStack item, EntityPlayer player, + DamageSource source, float amount); + + /** + * This does an action whenever an Entity gets attacked by a player, + * this includes other Players + * + * @param item + * The item stack of the item (allows for fine item search, + * like metadata and nbt) + * @param player + * The attacking player + * @param entity + * The target entity + * @param amount + * The amount of damage dealt + */ + public void onEntityAttackedByPlayer(ItemStack item, + EntityPlayer player, EntityLivingBase entity, float amount); + + /** + * This runs whenever a player dies + * + * @param item + * The item stack of the item (allows for fine item search, + * like metadata and nbt) + * @param player + * The player that died + * @param source + * The damage source that caused the death + */ + public void onPlayerDeadAction(ItemStack item, EntityPlayer player, + DamageSource source); + + /** + * Runs whenever a player respawns (switches dimensions or actually + * respawns) + * + * @param item + * The item stack of the item (allows for fine item search, + * like metadata and nbt) + * @param event + * The clone event that runs whenever a player respawns, + * either because he died or switched dimensions + */ + public void onPlayerRespawnAction(ItemStack item, + PlayerEvent.Clone event); + + /** + * This runs when the item is equipped + * + * @param item + * The item stack of the item (allows for fine item search, + * like metadata and nbt) + */ + public void onJewelryEquipped(ItemStack item); + + /** + * This runs when the item is unequipped + * + * @param item + * The item stack of the item (allows for fine item search, + * like metadata and nbt) + */ + public void onJewelryUnequipped(ItemStack item); } -- cgit v1.2.3