}
// if the item is not contained, the item is on the ground
if (parent == entity) {
data.addSourceItem(entity);
data.addSourceSlot(new GroundSlot(player.getZone(), entity));
} else {
data.addSourceItem(entity);
data.setSourceRoot(root);
data.addSourceSlot((EntitySlot) entity.getContainerSlot());
}