diff options
| author | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2015-05-07 13:34:21 +0100 |
|---|---|---|
| committer | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2015-05-07 13:34:21 +0100 |
| commit | c5e04f2c8e0c5393d9a5ef63a87ae4f0094af301 (patch) | |
| tree | 170a49181f336842c82cf6e12f63f7e4b8e2cad1 /src/main/java/darkknight/jewelrycraft/item/ItemGuide.java | |
| parent | 208b1f1e0d5faf601b53818b04f6699b2e6cb6bc (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/item/ItemGuide.java')
| -rw-r--r-- | src/main/java/darkknight/jewelrycraft/item/ItemGuide.java | 59 |
1 files changed, 58 insertions, 1 deletions
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 |
