robots drop their inventory when destroyed
This commit is contained in:
parent
8b362520e8
commit
bf24beb726
1 changed files with 8 additions and 0 deletions
|
@ -942,6 +942,14 @@ public class EntityRobot extends EntityRobotBase implements
|
|||
ItemStack robotStack = new ItemStack (BuildCraftSilicon.robotItem);
|
||||
NBTUtils.getItemData(robotStack).setTag("board", originalBoardNBT);
|
||||
entityDropItem(robotStack, 0);
|
||||
if (itemInUse != null) {
|
||||
entityDropItem(itemInUse, 0);
|
||||
}
|
||||
for (ItemStack element : inv) {
|
||||
if (element != null) {
|
||||
entityDropItem(element, 0);
|
||||
}
|
||||
}
|
||||
|
||||
getRegistry().killRobot(this);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue