Hello I want to drop a item from a inventory
while (index != -1) {
count += entity.inventory.get(index).count;
entity.inventory.set(index, 'minecraft:air');
index = entity.inventory.find(item);
}
entity.sendInventoryUpdate();
this is currently my script but instead of removing directly the item from the inventory I want to drop it from the inventory