robots drop their inventory when destroyed

This commit is contained in:
Hea3veN 2015-02-14 15:59:15 -03:00 committed by asiekierka
parent 8b362520e8
commit bf24beb726

View file

@ -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);
}