summaryrefslogtreecommitdiff
path: root/common/darkknight/jewelrycraft/item
diff options
context:
space:
mode:
authorOnyxDarkKnight <sor1n.iliutza16@gmail.com>2013-12-16 18:00:50 +0200
committerOnyxDarkKnight <sor1n.iliutza16@gmail.com>2013-12-16 18:00:50 +0200
commit5ccd234e08724dfb90e5ad416771d87f591bc4fe (patch)
tree163694d8d21743826a4b383e4d6ef0120a27ec73 /common/darkknight/jewelrycraft/item
parenta790a85e5dd59fd4e320c5445a655c503de6c702 (diff)
stuff with rings and stuff
Diffstat (limited to 'common/darkknight/jewelrycraft/item')
-rw-r--r--common/darkknight/jewelrycraft/item/ItemRing.java6
-rw-r--r--common/darkknight/jewelrycraft/item/ItemThiefGloves.java3
2 files changed, 8 insertions, 1 deletions
diff --git a/common/darkknight/jewelrycraft/item/ItemRing.java b/common/darkknight/jewelrycraft/item/ItemRing.java
index 155261c..c96dd2f 100644
--- a/common/darkknight/jewelrycraft/item/ItemRing.java
+++ b/common/darkknight/jewelrycraft/item/ItemRing.java
@@ -5,6 +5,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.world.World;
public class ItemRing extends ItemBase
{
@@ -33,6 +34,11 @@ public class ItemRing extends ItemBase
{
return 65535;
}
+ public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)
+ {
+ par2EntityPlayer.addChatMessage("Hello");
+ return true;
+ }
/**
* allows items to add custom lines of information to the mouseover description
diff --git a/common/darkknight/jewelrycraft/item/ItemThiefGloves.java b/common/darkknight/jewelrycraft/item/ItemThiefGloves.java
index 97d83cd..3621dae 100644
--- a/common/darkknight/jewelrycraft/item/ItemThiefGloves.java
+++ b/common/darkknight/jewelrycraft/item/ItemThiefGloves.java
@@ -37,8 +37,9 @@ public class ItemThiefGloves extends ItemBase
while(iterator.hasNext())
{
MerchantRecipe recipe = (MerchantRecipe)iterator.next();
+ int toolUses = (Integer) ReflectionHelper.getPrivateValue(MerchantRecipe.class, recipe, "toolUses", "field_77400_d");
int quantity;
- if(recipe.getItemToSell().isStackable()) quantity = recipe.getItemToSell().stackSize * 7;
+ if(recipe.getItemToSell().isStackable()) quantity = recipe.getItemToSell().stackSize * (7 - toolUses);
else quantity = 1;
ItemStack s = new ItemStack(recipe.getItemToSell().itemID, quantity, recipe.getItemToSell().getItemDamage());
s.setTagCompound(recipe.getItemToSell().getTagCompound());