public static void offerOrDropItem(EntityMinecart cart, ItemStack stack) {
        stack = transferHelper.pushStack(cart, stack);

        if (stack != null && stack.stackSize > 0)
            cart.entityDropItem(stack, 1);
    }