From c5e04f2c8e0c5393d9a5ef63a87ae4f0094af301 Mon Sep 17 00:00:00 2001 From: OnyxDarkKnight Date: Thu, 7 May 2015 13:34:21 +0100 Subject: - 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 --- .../darkknight/jewelrycraft/item/ItemGuide.java | 59 +++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) (limited to 'src/main/java/darkknight/jewelrycraft/item/ItemGuide.java') diff --git a/src/main/java/darkknight/jewelrycraft/item/ItemGuide.java b/src/main/java/darkknight/jewelrycraft/item/ItemGuide.java index 28d0c76..cf773c8 100644 --- a/src/main/java/darkknight/jewelrycraft/item/ItemGuide.java +++ b/src/main/java/darkknight/jewelrycraft/item/ItemGuide.java @@ -1,12 +1,18 @@ package darkknight.jewelrycraft.item; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.DamageSource; import net.minecraft.world.World; +import net.minecraftforge.event.entity.player.PlayerEvent.Clone; import darkknight.jewelrycraft.JewelrycraftMod; +import darkknight.jewelrycraft.api.IJewelryItem; -public class ItemGuide extends Item +public class ItemGuide extends Item implements IJewelryItem { public ItemGuide() { @@ -19,4 +25,55 @@ public class ItemGuide extends Item if (world.isRemote) player.openGui(JewelrycraftMod.instance, 1, player.worldObj, 0, 0, 0); return stack; } + + /** + * @return + */ + @Override + public int type() + { + return 0; + } + + /** + * @param player + */ + @Override + public void onWearAction(EntityPlayer player) + { + player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 20, 0)); + } + + /** + * @param player + * @param source + * @param amount + */ + @Override + public void onPlayerAttackedAction(EntityPlayer player, DamageSource source, float amount) + {} + + /** + * @param player + * @param entity + * @param amount + */ + @Override + public void onEntityAttackedByPlayer(EntityPlayer player, EntityLivingBase entity, float amount) + {} + + /** + * @param player + * @param source + */ + @Override + public void onPlayerDeadAction(EntityPlayer player, DamageSource source) + {} + + /** + * @param event + */ + @Override + public void onPlayerRespawnAction(Clone event) + {} } \ No newline at end of file -- cgit v1.2.3