mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-21 12:42:57 +00:00
Light Aggregator
This commit is contained in:
1 parent
adfd1117eb
commit
4360dfaf1e
31 files changed
+1515
-349
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user