summaryrefslogtreecommitdiff
path: root/common/darkknight/jewelrycraft/block
diff options
context:
space:
mode:
authorOnyxDarkKnight <sor1n.iliutza16@gmail.com>2013-12-20 11:47:07 +0200
committerOnyxDarkKnight <sor1n.iliutza16@gmail.com>2013-12-20 11:47:07 +0200
commit188150bf829add4418cdbb15f679d705b489ff9e (patch)
treee7929744805fb38233697de46626b3301c8da158 /common/darkknight/jewelrycraft/block
parentd8bcaa05a5536f76aaf3d2286d3bb1c368586d1e (diff)
Working stuff
Diffstat (limited to 'common/darkknight/jewelrycraft/block')
-rw-r--r--common/darkknight/jewelrycraft/block/BlockJewelrsCraftingTable.java3
-rw-r--r--common/darkknight/jewelrycraft/block/BlockMolder.java2
-rw-r--r--common/darkknight/jewelrycraft/block/BlockSmelter.java2
3 files changed, 6 insertions, 1 deletions
diff --git a/common/darkknight/jewelrycraft/block/BlockJewelrsCraftingTable.java b/common/darkknight/jewelrycraft/block/BlockJewelrsCraftingTable.java
index d151808..967aa18 100644
--- a/common/darkknight/jewelrycraft/block/BlockJewelrsCraftingTable.java
+++ b/common/darkknight/jewelrycraft/block/BlockJewelrsCraftingTable.java
@@ -66,12 +66,14 @@ public class BlockJewelrsCraftingTable extends BlockContainer
if (te.hasModifier && entityPlayer.isSneaking())
{
entityPlayer.inventory.addItemStackToInventory(new ItemStack(te.modifier.itemID, 1, te.modifier.getItemDamage()));
+ entityPlayer.inventory.onInventoryChanged();
te.modifier = new ItemStack(0, 0, 0);
te.hasModifier = false;
}
if (te.hasJewel && entityPlayer.isSneaking())
{
entityPlayer.inventory.addItemStackToInventory(new ItemStack(te.jewel.itemID, 1, te.jewel.getItemDamage()));
+ entityPlayer.inventory.onInventoryChanged();
te.jewel = new ItemStack(0, 0, 0);
te.hasJewel = false;
}
@@ -87,6 +89,7 @@ public class BlockJewelrsCraftingTable extends BlockContainer
{
ItemRing.addEffect(item, Potion.fireResistance.id);
player.inventory.addItemStackToInventory(item);
+ player.inventory.onInventoryChanged();
}
}
diff --git a/common/darkknight/jewelrycraft/block/BlockMolder.java b/common/darkknight/jewelrycraft/block/BlockMolder.java
index a3df95f..7967cbd 100644
--- a/common/darkknight/jewelrycraft/block/BlockMolder.java
+++ b/common/darkknight/jewelrycraft/block/BlockMolder.java
@@ -57,6 +57,7 @@ public class BlockMolder extends BlockContainer
if (te.hasMold && entityPlayer.isSneaking() && !world.isRemote)
{
entityPlayer.inventory.addItemStackToInventory(new ItemStack(te.mold.itemID, 1, te.mold.getItemDamage()));
+ entityPlayer.inventory.onInventoryChanged();
te.mold = new ItemStack(0, 0, 0);
te.hasMold = false;
te.isDirty = true;
@@ -121,6 +122,7 @@ public class BlockMolder extends BlockContainer
ItemRing.addMetal(item, metal);
}
player.inventory.addItemStackToInventory(item);
+ player.inventory.onInventoryChanged();
}
}
diff --git a/common/darkknight/jewelrycraft/block/BlockSmelter.java b/common/darkknight/jewelrycraft/block/BlockSmelter.java
index 8e97769..57501a2 100644
--- a/common/darkknight/jewelrycraft/block/BlockSmelter.java
+++ b/common/darkknight/jewelrycraft/block/BlockSmelter.java
@@ -80,7 +80,7 @@ public class BlockSmelter extends BlockContainer
ItemStack item = entityPlayer.inventory.getCurrentItem();
if (te != null && !world.isRemote)
{
- if (!te.hasMetal && !te.hasMoltenMetal && item != null && item.getDisplayName().contains("Ingot") && !item.getDisplayName().contains("Mold"))
+ if (!te.hasMetal && !te.hasMoltenMetal && item != null && item.getUnlocalizedName().toLowerCase().contains("ingot") && !item.getDisplayName().contains("Mold"))
{
entityPlayer.addChatMessage(StatCollector.translateToLocalFormatted("chatmessage.jewelrycraft.smelter.nowsmeltingingot", item.getDisplayName()));
te.metal = new ItemStack(item.itemID, 1, item.getItemDamage());