summaryrefslogtreecommitdiff
path: root/src/main/java/darkknight/jewelrycraft/api/IJewelryItem.java
diff options
context:
space:
mode:
authorOnyxDarkKnight <sor1n.iliutza16@gmail.com>2015-05-07 13:34:21 +0100
committerOnyxDarkKnight <sor1n.iliutza16@gmail.com>2015-05-07 13:34:21 +0100
commitc5e04f2c8e0c5393d9a5ef63a87ae4f0094af301 (patch)
tree170a49181f336842c82cf6e12f63f7e4b8e2cad1 /src/main/java/darkknight/jewelrycraft/api/IJewelryItem.java
parent208b1f1e0d5faf601b53818b04f6699b2e6cb6bc (diff)
- Added EE3 EMC values, thank you to MineMarteen for providing the ThirdPartyManager code :)
- Working on making it possible to translate every part of the mod - Created an interface modders can use to make an item wearable in the jewelry inventory and have special effects
Diffstat (limited to 'src/main/java/darkknight/jewelrycraft/api/IJewelryItem.java')
-rw-r--r--src/main/java/darkknight/jewelrycraft/api/IJewelryItem.java57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/main/java/darkknight/jewelrycraft/api/IJewelryItem.java b/src/main/java/darkknight/jewelrycraft/api/IJewelryItem.java
new file mode 100644
index 0000000..26ce183
--- /dev/null
+++ b/src/main/java/darkknight/jewelrycraft/api/IJewelryItem.java
@@ -0,0 +1,57 @@
+/**
+ *
+ */
+package darkknight.jewelrycraft.api;
+
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.DamageSource;
+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 player The player wearing the jewelry
+ */
+ public void onWearAction(EntityPlayer player);
+
+ /**
+ * This performs an action whenever a player gets attacked by an entity besides another Player
+ * @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);
+
+ /**
+ * This does an action whenever an Entity gets attacked by a player, this includes other Players
+ * @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);
+
+ /**
+ * This runs whenever a player dies
+ * @param player The player that died
+ * @param source The damage source that caused the death
+ */
+ public void onPlayerDeadAction(EntityPlayer player, DamageSource source);
+
+ /**
+ * Runs whenever a player respawns (switches dimensions or actually respawns)
+ * @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);
+}