summaryrefslogtreecommitdiff
path: root/src/main/java/darkknight/jewelrycraft/api/ModifierEffect.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/darkknight/jewelrycraft/api/ModifierEffect.java')
-rwxr-xr-xsrc/main/java/darkknight/jewelrycraft/api/ModifierEffect.java26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/main/java/darkknight/jewelrycraft/api/ModifierEffect.java b/src/main/java/darkknight/jewelrycraft/api/ModifierEffect.java
index 8e58f72..cbd740b 100755
--- a/src/main/java/darkknight/jewelrycraft/api/ModifierEffect.java
+++ b/src/main/java/darkknight/jewelrycraft/api/ModifierEffect.java
@@ -3,17 +3,20 @@ package darkknight.jewelrycraft.api;
import java.util.ArrayList;
import java.util.Random;
+import darkknight.jewelrycraft.item.ItemBaseJewelry;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.DamageSource;
+import net.minecraftforge.event.entity.living.LivingAttackEvent;
+import net.minecraftforge.event.entity.living.LivingDropsEvent;
import net.minecraftforge.event.entity.player.PlayerEvent;
public class ModifierEffect {
protected ItemStack modifier;
protected Random rand = new Random();
-
+
protected static ArrayList<ModifierEffect> effects = new ArrayList<>();
/**
@@ -22,7 +25,7 @@ public class ModifierEffect {
*/
public ModifierEffect(ItemStack modifier) {
this.modifier = modifier;
-
+
if (modifier != null) {
effects.add(this);
}
@@ -70,12 +73,12 @@ public class ModifierEffect {
* The attacked entity
* @param jewelry
* The actual jewelry item (aka item.getItem(), almost)
- * @param amount
+ * @param event
* The amount of damage the entity took
* @return The state of the event (true to cancel it, false to not)
*/
public boolean onEntityAttackedCancellable(ItemStack item, EntityPlayer player, Entity target, Item jewelry,
- float amount) {
+ LivingAttackEvent event) {
return false;
}
@@ -113,10 +116,11 @@ public class ModifierEffect {
* The attacked entity
* @param jewelry
* The actual jewelry item (aka item.getItem(), almost)
- * @param amount
+ * @param event
* The amount of damage the entity took
*/
- public void onEntityAttacked(ItemStack item, EntityPlayer player, Entity target, Item jewelry, float amount) {
+ public void onEntityAttacked(ItemStack item, EntityPlayer player, Entity target, Item jewelry,
+ LivingAttackEvent event) {
// Do nothing
}
@@ -179,7 +183,7 @@ public class ModifierEffect {
* @param jewelry
* The actual jewelry item (aka item.getItem(), almost)
*/
- public void onJewelryEquipped(ItemStack item, Item jewelry) {
+ public void onJewelryEquipped(ItemStack item, Item jewelry, EntityPlayer player) {
// Do nothing
}
@@ -191,7 +195,13 @@ public class ModifierEffect {
* @param jewelry
* The actual jewelry item (aka item.getItem(), almost)
*/
- public void onJewelryUnequipped(ItemStack item, Item jewelry) {
+ public void onJewelryUnequipped(ItemStack item, Item jewelry, EntityPlayer player) {
// Do nothing
}
+
+ public void onLivingDropItems(ItemStack item, EntityPlayer player, LivingDropsEvent event,
+ ItemBaseJewelry jewelry) {
+ // TODO Auto-generated method stub
+
+ }
}