Light Aggregator

This commit is contained in:
mDiyo committed 2013-08-31 04:36:20 -07:00
1 parent adfd1117eb
commit 4360dfaf1e
31 files changed
+1515 -349

No files matched your search

+11 -10
View File
@@ -30,17 +30,18 @@ public class Chisel extends ToolCore
@Override
public ItemStack getContainerItemStack (ItemStack itemStack)
{
//AbilityHelper.damageTool(itemStack, 1, null, false);
int reinforced = 0;
NBTTagCompound tags = itemStack.getTagCompound();
if (tags.getCompoundTag("InfiTool").hasKey("Unbreaking"))
reinforced = tags.getCompoundTag("InfiTool").getInteger("Unbreaking");
if (random.nextInt(10) < 10 - reinforced)
if (itemStack.hasTagCompound())
{
AbilityHelper.damageTool(itemStack, 1, null, false);
int reinforced = 0;
NBTTagCompound tags = itemStack.getTagCompound();
if (tags.getCompoundTag("InfiTool").hasKey("Unbreaking"))
reinforced = tags.getCompoundTag("InfiTool").getInteger("Unbreaking");
if (random.nextInt(10) < 10 - reinforced)
{
AbilityHelper.damageTool(itemStack, 1, null, false);
}
}
return itemStack;
}