diff options
| author | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2015-03-23 14:25:27 +0000 |
|---|---|---|
| committer | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2015-03-23 14:25:27 +0000 |
| commit | e86949a1ad3269ec66c9de65e2c92f5e66251411 (patch) | |
| tree | abe7a3b14d7a5f7bb27a916a991f8911de94c1d2 /java/darkknight/jewelrycraft/effects/ModifierEffects.java | |
| parent | 12cb40ba14e76b999a381b1f122bfce73223fd38 (diff) | |
More stuff. I don't even know by this point....
Diffstat (limited to 'java/darkknight/jewelrycraft/effects/ModifierEffects.java')
| -rw-r--r-- | java/darkknight/jewelrycraft/effects/ModifierEffects.java | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/java/darkknight/jewelrycraft/effects/ModifierEffects.java b/java/darkknight/jewelrycraft/effects/ModifierEffects.java index 2d62639..d3c8e38 100644 --- a/java/darkknight/jewelrycraft/effects/ModifierEffects.java +++ b/java/darkknight/jewelrycraft/effects/ModifierEffects.java @@ -1,15 +1,17 @@ package darkknight.jewelrycraft.effects; import java.util.ArrayList; +import java.util.Random; 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; -public abstract class ModifierEffects +public class ModifierEffects { protected ItemStack modifier; + protected Random rand = new Random(); protected static ArrayList<ModifierEffects> effects = new ArrayList<ModifierEffects>(); /** @@ -34,7 +36,8 @@ public abstract class ModifierEffects * @param player * @param jewelry */ - public abstract void action(ItemStack item, EntityPlayer player, Item jewelry); + public void action(ItemStack item, EntityPlayer player, Item jewelry) + {}; /** * @param item @@ -43,7 +46,10 @@ public abstract class ModifierEffects * @param jewelry * @return */ - public abstract boolean onEntityAttackedCacellable(ItemStack item, EntityPlayer player, Entity target, Item jewelry, float amount); + public boolean onEntityAttackedCacellable(ItemStack item, EntityPlayer player, Entity target, Item jewelry, float amount) + { + return false; + } /** * @param item @@ -52,24 +58,20 @@ public abstract class ModifierEffects * @param jewelry * @return */ - public abstract boolean onPlayerAttackedCacellable(ItemStack item, EntityPlayer player, DamageSource source, Item jewelry, float amount); - /** - * @param item - * @param player - * @param target - * @param jewelry - * @return - */ - public abstract void onEntityAttacked(ItemStack item, EntityPlayer player, Entity target, Item jewelry, float amount); + public boolean onPlayerAttackedCacellable(ItemStack item, EntityPlayer player, DamageSource source, Item jewelry, float amount) + { + return false; + } /** * @param item * @param player - * @param source + * @param target * @param jewelry * @return */ - public abstract void onPlayerAttacked(ItemStack item, EntityPlayer player, DamageSource source, Item jewelry, float amount); + public void onEntityAttacked(ItemStack item, EntityPlayer player, Entity target, Item jewelry, float amount) + {} /** * @param item @@ -78,5 +80,6 @@ public abstract class ModifierEffects * @param jewelry * @return */ - public abstract boolean onPlayerFall(ItemStack item, EntityPlayer player, Item jewelry); + public void onPlayerAttacked(ItemStack item, EntityPlayer player, DamageSource source, Item jewelry, float amount) + {} } |
