diff options
| author | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2015-04-25 13:17:09 +0100 |
|---|---|---|
| committer | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2015-04-25 13:17:09 +0100 |
| commit | 094d38d3e742cd2397f8f86b3f4fe762e064d790 (patch) | |
| tree | 07680197962dd217de87c871e7d5a67172a48000 /src/main/java/darkknight/jewelrycraft/api/ModifierEffects.java | |
| parent | 95c7c8611a0b61d8bd65e71466f96e283a20aef2 (diff) | |
Working api + hoping to fix jenkins build + trying to make blocks shiny
Diffstat (limited to 'src/main/java/darkknight/jewelrycraft/api/ModifierEffects.java')
| -rw-r--r-- | src/main/java/darkknight/jewelrycraft/api/ModifierEffects.java | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/src/main/java/darkknight/jewelrycraft/api/ModifierEffects.java b/src/main/java/darkknight/jewelrycraft/api/ModifierEffects.java new file mode 100644 index 0000000..1b930c9 --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/api/ModifierEffects.java @@ -0,0 +1,85 @@ +package darkknight.jewelrycraft.api; + +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 class ModifierEffects +{ + protected ItemStack modifier; + protected Random rand = new Random(); + protected static ArrayList<ModifierEffects> effects = new ArrayList<ModifierEffects>(); + + /** + * @param modifier + */ + public ModifierEffects(ItemStack modifier) + { + this.modifier = modifier; + effects.add(this); + } + + /** + * @return + */ + public static ArrayList<ModifierEffects> getEffects() + { + return effects; + } + + /** + * @param item + * @param player + * @param jewelry + */ + public void action(ItemStack item, EntityPlayer player, Item jewelry) + {}; + + /** + * @param item + * @param player + * @param target + * @param jewelry + * @return + */ + public boolean onEntityAttackedCacellable(ItemStack item, EntityPlayer player, Entity target, Item jewelry, float amount) + { + return false; + } + + /** + * @param item + * @param player + * @param source + * @param jewelry + * @return + */ + public boolean onPlayerAttackedCacellable(ItemStack item, EntityPlayer player, DamageSource source, Item jewelry, float amount) + { + return false; + } + + /** + * @param item + * @param player + * @param target + * @param jewelry + * @return + */ + public void onEntityAttacked(ItemStack item, EntityPlayer player, Entity target, Item jewelry, float amount) + {} + + /** + * @param item + * @param player + * @param source + * @param jewelry + * @return + */ + public void onPlayerAttacked(ItemStack item, EntityPlayer player, DamageSource source, Item jewelry, float amount) + {} +} |
