From 01c8701b68986ccfa83e902515716838d6829311 Mon Sep 17 00:00:00 2001 From: Onyx Date: Tue, 1 Dec 2015 20:55:30 +0000 Subject: - Fixed all of the bugs mentioned on github - Added new config options - Rabbits paw now increases the chance of spawning hearts, rather than itself spawning some - Hearts now have a much lower chance to spawn by default - You can no longer increase your health past 20 hearts (aka double the default health) - The guide now also shows the total number of pages on each tab - A new luck stat has been added to the Curse API - Cleaned up the code a bit (removed unused methods, imports etc) - The displayer's info now has a purple solid color background; the text also has a much closer shadow and now shrinks in height as well as in width when too big - I have modified the potion list to use Mithion's code, credits have been given --- .../jewelrycraft/item/ItemBaseJewelry.java | 46 ++++++++++------------ 1 file changed, 20 insertions(+), 26 deletions(-) (limited to 'src/main/java/darkknight/jewelrycraft/item/ItemBaseJewelry.java') diff --git a/src/main/java/darkknight/jewelrycraft/item/ItemBaseJewelry.java b/src/main/java/darkknight/jewelrycraft/item/ItemBaseJewelry.java index a67a274..6df3b1b 100644 --- a/src/main/java/darkknight/jewelrycraft/item/ItemBaseJewelry.java +++ b/src/main/java/darkknight/jewelrycraft/item/ItemBaseJewelry.java @@ -1,33 +1,7 @@ package darkknight.jewelrycraft.item; -import java.awt.image.BufferedImage; -import java.io.IOException; import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; -import java.util.HashMap; -import java.util.LinkedList; import java.util.List; -import java.util.Map; - -import javax.imageio.ImageIO; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockAir; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.texture.TextureManager; -import net.minecraft.client.resources.IResourceManager; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IIcon; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; -import net.minecraftforge.event.entity.player.PlayerEvent; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import darkknight.jewelrycraft.JewelrycraftMod; @@ -36,6 +10,14 @@ import darkknight.jewelrycraft.config.ConfigHandler; import darkknight.jewelrycraft.util.JewelryNBT; import darkknight.jewelrycraft.util.JewelrycraftUtil; import darkknight.jewelrycraft.util.Variables; +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.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; +import net.minecraftforge.event.entity.player.PlayerEvent; public abstract class ItemBaseJewelry extends Item { @@ -163,4 +145,16 @@ public abstract class ItemBaseJewelry extends Item for(ModifierEffects mod: ModifierEffects.getEffects()) if (JewelryNBT.doesModifierExist(item, mod.getModifier())) mod.onPlayerRespawn(item, event, this); } + + public void onJewelryEquipped(ItemStack item) + { + for(ModifierEffects mod: ModifierEffects.getEffects()) + if (JewelryNBT.doesModifierExist(item, mod.getModifier())) mod.onJewelryEquipped(item, this); + } + + public void onJewelryUnequipped(ItemStack item) + { + for(ModifierEffects mod: ModifierEffects.getEffects()) + if (JewelryNBT.doesModifierExist(item, mod.getModifier())) mod.onJewelryUnequipped(item, this); + } } -- cgit v1.2.3