diff options
| author | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2015-05-07 14:32:45 +0100 |
|---|---|---|
| committer | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2015-05-07 14:32:45 +0100 |
| commit | 2342897a409d08e2431b66191c4a7c4491e5222d (patch) | |
| tree | 2d4cb5dbae8b95bd4f542e003be5621d47b3e870 /src/main/java/darkknight/jewelrycraft/api/IJewelryItem.java | |
| parent | 74fbeb38e032b25fc278810d2d3df0f0ed0234ef (diff) | |
Refined the Interface a bit more
Diffstat (limited to 'src/main/java/darkknight/jewelrycraft/api/IJewelryItem.java')
| -rw-r--r-- | src/main/java/darkknight/jewelrycraft/api/IJewelryItem.java | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/main/java/darkknight/jewelrycraft/api/IJewelryItem.java b/src/main/java/darkknight/jewelrycraft/api/IJewelryItem.java index 26ce183..80121de 100644 --- a/src/main/java/darkknight/jewelrycraft/api/IJewelryItem.java +++ b/src/main/java/darkknight/jewelrycraft/api/IJewelryItem.java @@ -5,6 +5,7 @@ package darkknight.jewelrycraft.api; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; import net.minecraft.util.DamageSource; import net.minecraftforge.event.entity.player.PlayerEvent; @@ -21,37 +22,42 @@ public interface IJewelryItem /** * 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(EntityPlayer player); + 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(EntityPlayer player, DamageSource source, float amount); + 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(EntityPlayer player, EntityLivingBase entity, float amount); + 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(EntityPlayer player, DamageSource source); + 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(PlayerEvent.Clone event); + public void onPlayerRespawnAction(ItemStack item, PlayerEvent.Clone event); } |
