addToInventoryPrioritizedOrDrop

fun Player.addToInventoryPrioritizedOrDrop(prioritizedSlot: Int, itemStack: ItemStack)
fun LivingEntity.addToInventoryPrioritizedOrDrop(prioritizedSlot: EquipmentSlot, itemStack: ItemStack)

Puts an ItemStack on the prioritizedSlot or adds it to the Inventory if the given slot is occupied or drops it on the ground if there is not enough space.