mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-20 04:09:40 +00:00
Prevent King Slime Tool drops from crashing under weird circumstances.
This commit is contained in:
1 parent
0e07f2c4b9
commit
e632373f62
1 file changed
+11
-10
@@ -481,17 +481,18 @@ public class BlueSlime extends EntityLiving implements IMob, IBossDisplayData
|
||||
ItemStack toolStack = ToolBuilder.instance.buildTool(new ItemStack(tool.getHeadItem(), 1, 17), new ItemStack(tool.getHandleItem(), 1, 17), accessoryStack, extraStack,
|
||||
"King Slime " + tool.getToolName());
|
||||
|
||||
NBTTagCompound tags = toolStack.getTagCompound().getCompoundTag("InfiTool");
|
||||
tags.setInteger("Attack", 5 + tool.getDamageVsEntity(null));
|
||||
tags.setInteger("TotalDurability", 2500);
|
||||
tags.setInteger("BaseDurability", 2500);
|
||||
tags.setInteger("MiningSpeed", 1400);
|
||||
if(toolStack != null) {
|
||||
NBTTagCompound tags = toolStack.getTagCompound().getCompoundTag("InfiTool");
|
||||
tags.setInteger("Attack", 5 + tool.getDamageVsEntity(null));
|
||||
tags.setInteger("TotalDurability", 2500);
|
||||
tags.setInteger("BaseDurability", 2500);
|
||||
tags.setInteger("MiningSpeed", 1400);
|
||||
|
||||
this.entityDropItem(toolStack, 0f);
|
||||
if (rand.nextInt(5) == 0)
|
||||
{
|
||||
ItemStack dropStack = new ItemStack(TinkerArmor.heartCanister, 1, 1);
|
||||
this.entityDropItem(dropStack, 0f);
|
||||
this.entityDropItem(toolStack, 0f);
|
||||
if (rand.nextInt(5) == 0) {
|
||||
ItemStack dropStack = new ItemStack(TinkerArmor.heartCanister, 1, 1);
|
||||
this.entityDropItem(dropStack, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user